Unique Drop down not showing all results why?

Hi

In this code my drop down filterInput does not show all the unique values (My clients names) from my dataset checkinsDataset

for some reason it stops at 90 unique entries down to the name Mark Newman.

Can anyone see from this code why the list is limited to 90 ?

Thanks

Dan

import wixData from ‘wix-data’ ;
// For full API documentation, including code examples, visit Velo API Reference - Wix.com

export function Filter_click(event) {
$w( “#checkinsDataset” ).setFilter(wixData.filter()
.contains( “name” , $w( “#filterInput” ).value));
}

export function clearFilter_click(event) {
$w( “#checkinsDataset” ).setFilter(wixData.filter());
}

$w.onReady( function () {
uniqueDropDown1();
});

function uniqueDropDown1 (){
wixData.query( “Checkins” )
.ascending( “name” )
.limit( 1000 )
.find()
.then(results => {
const uniqueTitles = getUniqueTitles(results.items);
$w( “#filterInput” ).options = buildOptions(uniqueTitles);
});

function getUniqueTitles(items) {
const titlesOnly = items.map(item => item.name);
return [… new Set(titlesOnly)];
}

function buildOptions(uniqueList) {
return uniqueList.map(curr => {
return {label:curr, value:curr};
});
}
}

Hi Dan,

Rather than trying to troubleshoot why this isn’t working, I wanted to alert you that a distinct function was introduced in the last year. This is how you could implement it with your code:

export function uniqueDropDown1 (){
    wixData.query("Checkins")
    .limit(1000)
    .distinct("name")
    .then((results) => {
 	let items = results.items.sort();
        $w("#filterInput").options = buildOptions(items);
     });
}

Cheers @anthonyb

Nice addition that save alot of hassle thanks