This may sound strange but I am trying to run a query on a database (showInformation), and then I will use those results to filter a dataset on the page (dataset2) and I am coming up with nothing. The reason I want to do this is I have a dropdown where the values are populated from dataset2. I only want the states that have shows in them to appear. I tried just linking the values to the showInformation dataset that populates the repeater but, what I found was if there is more than one entry in state, the state shows up twice and I don’t want that. Maybe that was to much info but anyone if anyone can help me I would really appreciate it. The code I have so far is:
import wixData from 'wix-data';
let results = results
$w.onReady(function () {
wixData.query('showInformation')
.eq("states")
.find()
.then(() =>results (results.items));
console.log(results)
})