Backend query, Remove duplicate from dropdown

Hey @givemeawhisky I have seen this and can get this to work if i call this in the front end, I’m just trying to reduce code as I’ve had some complaints about the laggyness of the site… the code I have that works is this:

$w('#dropdownDifficulty').options = await populateDropdownFilter('DropdownData', 'category', 'Grade', 'value')
 let gradeOptions = $w("#dropdownDifficulty").options;
    gradeOptions.unshift({ 'value': '', 'label': 'All Grades' });
    $w("#dropdownDifficulty").options = gradeOptions;

But I have around 15 drop downs across the site and I thought I could try and manage this in the backend?