HI,
I'll try to explain it correctly.
I have a web site, this is the page of the code I'll provide below (there is more code, but this is what is important):
https://tinetine11.wixsite.com/website/competitif1/Sans-Limites-Dames-moins-de-7-ans
// For full API documentation, including code examples, visit http://wix.to/94BuAAs import wixLocation from 'wix-location'; import wixData from 'wix-data'; $w.onReady(function () { let donCategorie = $w('#dynamicDataset').getCurrentItem() let filter = wixData.filter().eq("categorie", donCategorie.categorie); $w('#text7').text = donCategorie.categorie wixData.aggregate("principalcompetitif1") .filter(filter) .group("prenom", "nom", "cpa") .max("short") .descending("shortMax") .limit(1000) .run() .then(res => { //console.log(res.items); //$w('#table2').rows = res.items; $w('#table2').rows = res.items.map((item, index) => Object.assign({}, item, { Rang: index + 1 })); });
Now what I want to do, I want to add a new column that will get from my database the competiton where they got the max short. This page is coming from a choice from the user based on the categorie (category) the have selected.
If I add the column in my table with the right field in my database (called "competition") it seems like it doesnt know what it is. In the console.log(res.items); I dont see all the fields of the database. If I set the data with a let at the start of the code with donCategory.competition, it will get the data. But every competition will be different for every skater. How do I put it in my table ? I thought all data was there after the aggregate, but it seems to sort it out with only what is needed and drop all other fields.
I'm not really good with all that and English is not my 1st language.
Thank in advance for the help.
Still need this, if somebody could help, I would be greatful :).
Need that to continue my web site, if somebody can help would be appreciated.