I have a dropdown (#selectCountry) which if I connect to a dataset (#expDataset) and filtered to the column names “country” it correctly displays all “countries” in the datase. I need to populate the dropdown but only with the unique names in that dataset. Currently I have 5 rows: Argentina, Argentina, Zambia, Cambodia, Brazil. In the dropdown, I only want it to populate as: Argentina, Zambia, Cambodia, Brazil.
Thanks Uval, That was my intended approach but I’m not a heavy js guy so if you could think of a sample on how to pull that array, please post it.
What I did was drag into the page another instance of the dataset, renamed it and hooked up the dropdown to that dataset. My intention was to filter the countries in “that” dataset and generate a list of unique values and display that in the dropdown as options.
If I connect the dropdown to the same dataset, it pulls all of the values (including duplicate countries) and once I select a country, like Brasil, once the page refreshes then the dropdown also only shows Brasil as the only option.
Q: How can I code an array and populate the dropdown? THANKS!.. so close.
https://lopezblog.wix.com/omstaff
Right now, the dropdown value is manually populated (expedition list page). I think what I’m missing is a js file in Public that can take the dataset Expeditions, and create an array of the “Country” column with unique values. I would then use that unique list to somehow a) create another dataset with these unique values or 2) use those values as the dropdown list. I will create another page called expedition2 with the straight up dataset connection so you can see it populates each row value for the Country column.
Until Wix enables links between dataSets, I have not been able to figure out (for days now) how to pull out all the countries listed in the Country column inside the Expeditions’ collection. I want to somehow, look up all of the countries in all rows, then only list the unique names inside the dropdown option list. Thanks all, I love the site and I’m working hard to move over our entire website infrastructure to wix… I need to resolve these issues. M