I am making a directory for wedding vendors and they are categorized by state. There is more then one vendor from Colorado, therefore Colorado displays on the list more then once. Is there anyway to NOT have the categories repeat themselves?
The information displayed on table is from a submission form database.
Do I have to make a separate database for categories?
$w.onReady( () => {
$w("#dataset1").onReady( () => {
$w("#dataset1").getItems(0, 1000)
.then((res) => {
let states = res.items.map(e => {return e.state});//instead of "state" use your own field key
states = states.filter((e, index) => {states.indexOf(e) === index)});
//then assign states to your list element. I don't know i it's a repeater, table something else
})
})
})
import wixData from 'wix-data';
wixData.query("YourCollectionName")
.ascending("state")//use your field key
.limit(1000)
.distinct("state")
.then((res) => {
let states = res.items;
//then assign states to your list element. I don't know if it's a repeater, table something else
})
Woah this is way above my skill set as I haven’t done anything with coding on this current site!
Regardless I will look into it and I am so thankful of your response!