Fuzzy Search restuls not showing in UI but showing in query preview

,
  • Goal: When a user searches for a first name and last name in the search bar it should show the appropriate row. However the row only shows correctly in the query preview but not on the table. I'm already using fuzzy search so i'm pretty much at a loss here

Query:

SELECT *
FROM users
WHERE (
  {{ textInput1.value }} = ''
  OR lower(first_name) LIKE lower('%' || {{ textInput1.value }} || '%')
  OR lower(last_name) LIKE lower('%' || {{ textInput1.value }} || '%')
  OR lower(first_name || ' ' || last_name) LIKE lower('%' || {{ textInput1.value }} || '%')
  OR lower(email) LIKE lower('%' || {{ textInput1.value }} || '%')
)
ORDER BY id;


Screenshot 2025-01-28 at 5.12.41 PM

1 Like

Hello @the-mystery-mermaid,

It's not a bug. You can create a SELECT query and add it to the table data source, so there’s no need to include the text input value in the Fuzzy match.

Your SELECT query works perfectly, as shown in the screenshot.

You can filter or search the data using the text input value already set in your query, so the fuzzy match is unnecessary.

Thank You.

4 Likes

Hi @the-mystery-mermaid, welcome to the forum!

In alternative to what suggested above, you can, if your app data structure allows for it, make a simple SQL query like select* from users and keep {{ textInput1.value }} in your table's "Search term".

This is also much more efficient as you query won't need to run every time your textInput1.value changes.

1 Like