Exceeding query limit when filtering

Hi

I’m trying to filter through 1900 lines. The three dropdowns will filter down to one result.

That’s the solution i’ve been trying to use but unfortunately I can’t figure out where it belongs within my code.

I believe it should be somewhere in this section…?

function uniqueDropdown(collectionName, dropdown, fieldKey, FilterKey, FilterValue) {
    $w("#" + dropdown).disable();
    $w("#" + dropdown).value = '';
 var query = wixData.query(collectionName);
 if (FilterKey) {
        query = query.eq(FilterKey, FilterValue);
    }
    query
        .limit(1000)
        .find()
        .then(results => {
 const uniqueTitles = getUniqueTitles(results.items);
            $w("#" + dropdown).options = buildOptions(uniqueTitles);
            $w("#" + dropdown).enable();
        });