Retool Table Filter Operator Options. How to set 'startsWith'

Hello,

I am using the Retool Build in Table Filter. End users can search on roomnumber.
Currently the operator is set to 'includes'.

When the end user searches on a roomnumber, for example input is '20'. All rooms starting with '20' should pop-up. However currently, as the operator is set to 'includes' I also get '120, 320, 420, etc.

Another example, when the input is '1', the user should only see rooms starting with '1' and not all rooms that have '1' such as 451, 321, 610.

Is it possible to still use the Retool Build in Filter, but change the operator to 'startsWith' ?

How important is it to use the built in filter for the table, @ellenhelena? Instead of directly using query results, you can use a transformer as your tables data source, and then filter the results within the transformer using the startsWith() operator.

Basic idea behind the transformer:

//get search term
const searchTerm = {{textInput1.value}}; 
//get full data set
const data = {{ formatDataAsArray(query1.data) }};
//initiate returned value
let filtered;

//if search is blank, return full data set
if (!searchTerm) {
  filtered = data;
//else, return filtered data set by 'startsWith()'
} else { 
  filtered = data.filter( function(room) { 
      return room.roomnumber.startsWith(searchTerm) 
  });
}
return filtered;

If you have other built in table filters, they should still work with the transformer as the data source. Maybe this helps?