top of page

Forum Posts

Moestuin Mams
Jun 02, 2023
In Coding with Velo
Hi everyone, I created a quintuple query based on the selection of a dropdownbox. All queries working, but for the last one as I need an image field to come along to be displayed on my page. Would anyone have an idea, or put me on the right path, how it's possible to take that image to the last query? Thanks anyone for your brainstormhelp. let Groep = $w('#dropdownGroepen').value wixData.query('tblSubGroep') .contains("groep", Groep) .limit(1000) .find() .then((resultSubGroep) => {// Correct Array with results from tblSubGroep let SubGroepIds = resultSubGroep.items.map(SubGroep => SubGroep._id) wixData.query('tblSubSubGroep') .hasSome("subGroep", SubGroepIds) .limit(1000) .find() .then((resultSubSubGroep) => {// Correct Array with results from tblSubSubGroep let SubSubGroepIds = resultSubSubGroep.items.map(SubSubGroep => SubSubGroep._id) wixData.query('tblZaaipakjes') .hasSome("groep", SubSubGroepIds) .limit(1000) .find() .then((resultsZaaipakjes) =>{// Correct array with results from tblZaaipakjes. In this collection/query result is the image I need to be displayed in the last query let ZaaipakjesIds = resultsZaaipakjes.items.map(Zaaipakjes => Zaaipakjes._id) wixData.query('tblZaaien') .include("zaad3") .hasSome("zaad3", ZaaipakjesIds) .limit(1000) .find() .then((resultsGezaaid) => {// Correct array with results from tblZaaien, tblZaaipakjes data included let GezaaidIds = resultsGezaaid.items.map(Gezaaid => Gezaaid._id) wixData.query('tblUitplanten') .include("idGezaaid2") .hasSome("idGezaaid2", GezaaidIds) .limit(1000) .find() .then((resultsUitgeplant) => { console.log(resultsUitgeplant)// Correct array with results from tblUitplanten, tblZaaien data included, but not tblZaadpakjes data (I need an image from the tblZaadpakjes collection to come along)
0
0
13

Moestuin Mams

More actions
bottom of page