How to Display Reference Field As A Filter Result

Hello everyone,

I am creating a repeater filter and would like to display the “Battery” field in the database shown below as the filtered result. I can’t seem to find any credible guidance on Google or YouTube.

If anyone is able to assist, I’d greatly appreciate it. This is my first coding job and I would love to learn as much as I can.

Just to make things a little clearer, I’ve attached screenshots of my database and page the repeater is located.

Here is my code:

import wixData from ‘wix-Data’;
import {year} from ‘public/data’;
import {make} from ‘public/data’;
import {model} from ‘public/data’;
// For full API documentation, including code examples, visit Velo API Reference - Wix.com

$w.onReady( function () {
//TODO: write your page related code here…

});

export function button3_click(event, $w) {
let battery = battery
$w(“#dataset1”).setFilter(wixData.filter()
.contains(year, $w(‘#yearDropdown’).value)
.contains(make, $w(‘#makeDropdown’).value)
.contains(model, $w(‘#modelDropdown’).value))
.find()
.then((results) => {
console.log (“Dataset is now filtered”);
$w(“#repeater1”).data = results.item;
}) . catch ((err) => {
console.log (err);
});

$w("#repeater1").expand; 
}