Being learning retool for the last few weeks but I’m left confused. After finally understanding how to make a search box for my table I seem to hit a brick wall.
I’ve tried using my mongodb to make a search bar for a table in my app. I don’t know if my database information isn’t set correctly but I can’t get the query correct.
So
I moved to using googlesheets and proceeded to try this way.
The query shows it’s working - showing the search criteria and row correctly but; the table it self doesn’t filter.
All
Tutorials I have watched shows that soon as I search or type in the search bar the result should be filtered out and the only data showing.
Hey @Chilaka
For this, you would have to format your query data into an array first.
In the main(parent) query Add a transformer to serialize your response data into an array.
It will solve your issue.
With the transformer, does readQuery return an array of objects? That is the format we need.
Can you share a screenshot of the response from readQuery in the left panel (expanded out to see the data). It should look something like this:
Another thing that might be helpful to test, is removing the where clause. Do the Query JSON with SQL queries work if you only query select * from {{readquery.data}} ?
If that is the case, we may need to check the where clause syntax or data type
Here, I queried JSON with SQL (removing the where clause), and the query ran successfully returning arrays
But when I add the filter where campaign ilike {{'%' + textInput1.value + '%'}} , the values I input in the textinput does not take effect
NB: campaign is the second column in the table
th
Hi @Tess I have spotted my error, thanks. When I checked the JSON values in the array after putting the where clause, I realized it had the impact I wanted
So the solution was I just needed a component to help me visualize the result. Thanks again