I am attempting to query a database using user input and return all rows where the provided data matches a specific field. I have an input field, with input type set to ‘number’. My code references the correct field key for the column containing the numeric data, with type of ‘number’. Queries return no results.
While testing I have determined that my query works when my input field is set to ‘text’ and my code points to a column formatted as ‘text’. However, I am attempting to query a number field.
import wixData from ‘wix-data’;
export function button2_click_1(event) {
wixData.query(‘RETS’)
.eq(‘agentOfficeId’, $w(‘#input2’).value)
.find()
.then(res =>
{
$w(‘#table2’).rows = res.items;
$w(“#table2”).expand();
});
}