Hi togehter,
I try to create a code to check the PrivateMember Database (ID) and compare it with the Owners ID of another Database. If the ID = the Owner, then I want my repeater to only display the results of the found Owner from the Database. Here is my Code so far: //Abgleich PrivateMember mit Punktekonten Database: import wixUsers from'wix-users'; $w.onReady(function () { let user = wixUsers.currentUser; let userId = user.id; let itemUser = $w('#PrivateMember').getCurrentItem()._id; if(userId === itemUser) { wixData.query("1-PunkteKonten") .eq("_owner", userId) .find(); .then( (results) => { // Here is my idea, but I miss the conditions to display only matched values for the repeater $w('#listRepeater').show(); $w('#search').show(); } else { $w('#listRepeater').hide(); $w('#search').hide(); } });
Any ideas?
Thanks for the support
Cheers Albert
$w.onReady(function(){ $w('#myRepeaterIDhere').onItemReady(($item, itemData, index)=>{ //Event starts - - > when REPEATERs ITEMS are ---> READY... $item('#text1').text = itemData.title; $item('#anotherTextelement').text = itemData.xxxxx; $item('#anotherImagelement').src = ""; }); //....some more code.......here..... //....some more code.......here..... //....some more code.......here..... //....some more code.......here..... if(userId === itemUser) { wixData.query("1-PunkteKonten") .eq("_owner", userId) .find(); .then((results) => { loadRepeaterData(results.items); } else { $w('#listRepeater').hide(); $w('#search').hide(); } //....some more code.......here..... //....some more code.......here..... //....some more code.......here..... //....some more code.......here..... }); function loadRepeaterData(data) { $w('#myRepeaterIDhere').data = data; $w('#listRepeater').show(); $w('#search').show(); }