Searching from table

Hi Tal,
Thanks for providing this solution. My only other question is where do i insert this code (what line)? I’ve attached a copy of my search page code below.

import wixData from “wix-data”;

// For full API documentation, including code examples, visit Velo API Reference - Wix.com

//TODO: write your page related code here…

export function searchbutton_click(event) {

// Runs a query on the “tenant database” collection
wixData.query(“Tenant_Blacklist”)
// Query the collection for any items whose “Name” field contains
// the value the user entered in the input element
.contains(“tenantFullName”, $w(“#input7”).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”: “tenantFullName”,
“label”: “tenantFullName”, // The column header
“width”: 100, // Column width
“type”: “string”, // Data type for the column
// Path for the column if it contains a link
“linkPath”: “link-field-or-property”
},
{
“id”: “col2”,
“dataPath”: “photos”,
“label”: “photos”,
“visible”: true ,
“type”: “image”,
“linkPath”: “link-field-or-property”
},
{
“id”: “col3”, // ID of the column for code purposes
// The field key in the collection whose data this column displays
“dataPath”: “scoreOutOf10”,
“label”: “scoreOutOf10”, // The column header
“width”: 100, // Column width
“type”: “string”, // Data type for the column
// Path for the column if it contains a link
“linkPath”: “link-field-or-property”
},

Thanks for your help!
Kind regards,
Leigh