Drop downs won't populate the repeater if the field key is a reference field

Hey Wix team!

I have a problem that I’m sure I’m doing something simple, but wrong, but hopefully shouldn’t be too hard to fix… I have been playing with the database and populating my drop downs with the title filed key from a certain database i.e. Course_Category
When filtering I have been using a text field in the courseCategory field, within the Courses database

function fillCourseCategoryDropdown (){
    wixData.query('Course_Category')
            .find()
            .then(res => {
 let options = [{
 "value": '',
 'label': 'All Courses'
                }];
                options.push(...res.items.map(title => {
 return {
 'value': title.title,
 'label': title.title
                    };
                }));
                $w('#courseCategoryDropdown').options = options;
            });
}

When I filter the results to display in a repeater, it all works great.

But if I use the Course_Category and reference this to the Courses collection in the courseCategory field then it doesn’t work…

I’m sure it has something to do with the

"value": '' 

part of the code but can’t seem to get it sorted…

I hope this makes sense! And thank you again in advance :slight_smile:

Anyone got any ideas??