collection-data-search-functionality

Hello - WIX sent me here from their support dept. Wondered if someone can help?
Regarding instructions at:
https://support.wix.com/en/article/corvid-tutorial-adding-collection-data-search-functionality
I tried both recommendations for search by text-entry for a city name, and a drop-down menu for a state, and neither yielded any results. Which I suspected I would probably miss something on the coding. I welcome any advice on my inaccurate coding?

The page code I currently have for javascript, attempting drop down menu as instructed, follows a repeater function:
export function dataset1_ready() {
//Add your code for this event here:
$w(" #repeater1 “).onItemReady( ($item, itemData, index) => {
$w(” #repeater1 “).forEachItem( () => { //loop the function
var string = itemData.firstName; //description is the field name in the database
var length = 15; //total amount of words you want to display onscreen
var trimmedString = string.substring(0, length);
$item(” #text159 “).text = String(trimmedString) + ‘’;
});
$w(” #repeater1 “).forEachItem( () => { //loop the function
var string = itemData.city; //description is the field name in the database
var length = 18; //total amount of words you want to display onscreen
var trimmedString = string.substring(0, length);
$item(” #text161 “).text = String(trimmedString) + ‘,’;
});
$w(” #repeater1 “).forEachItem( () => { //loop the function
var string = itemData.cellNumber; //description is the field name in the database
var length = 14; //total amount of words you want to display onscreen
var trimmedString = string.substring(0, length);
$item(” #text164 “).text = String(trimmedString) + ’ ';
});
});
} //Add your code for this event here:
import wixData from “wix-data”;
export function button6_click(event) {
// Runs a query on the “ModelSubmissions” collection
wixData.query(“ModelSubmissions”)
// Query the collection for any items whose “State” field contains
// the value the user entered in the input element
.contains(“state”, $w(” #dropdown13 “).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(” #table1 ").rows = res.items;
});
}
$w.onReady(function () {
$w(" #table1 ").columns = [
{
“id”: “col1”, // ID of the column for code purposes
// The field key in the collection whose data this column displays
“dataPath”: “photo1”,
“label”: "Profile Pic ", // The column header
“width”: 75, // Column width
“type”: “image”, // Data type for the column
// Path for the column if it contains a link :: Can you also please explain how to link each record to it’s dynamic page here?
“linkPath”: “link-field-or-property”
},
{
“id”: “col2”,
“dataPath”: “firstName”,
“label”: “First Name”,
“visible”: true,
“type”: “string”,
“linkPath”: “link-field-or-property”
} //,
// more column objects here if necessary
// …
// …
});
}

Yikes, this looks like very memory expensive code…
Try this tutorial:

Thank you very much @david - Greatly appreciated!!