Creating a search bar in a mobile app from Google Sheet data

Hi @Valentin_Jardinier_Almodovar ,

You have an error in your select query in the where clause.
You're using '&' to search for the value within the description. These should be '%'

SELECT * FROM {{getAllWines.data}}
WHERE {{ !wineSearch.value }} OR description LIKE {{ '&' + wineSearch.value + '&' }}

Instead use:

SELECT * FROM {{getAllWines.data}}
WHERE {{ !wineSearch.value }} OR description LIKE {{ '%' + wineSearch.value + '%' }}
3 Likes