I've got an API setup which is correctly pulling in information (. However, when I run a Query JSON with SQL script, it returns no results. Any ideas on how I can get this working?
Script:
SELECT *
FROM
{{ formatDataAsObject([table_mozenda_data.data]['0']) }}
WHERE
{{ formatDataAsObject([table_mozenda_data.data]['0'])['Product Code'] }} iLIKE {{textInput1.value}};
Thanks Stefan. I did actually try that - but it doesn't work. The idea behind the search box (or possibly a select box), is that a user will be able to type in the Product Code and the table will update based on the results. Have done this a few times before in other Retool apps using SQL data and it works fine. Just can't seem to nail it down with the API data though. The other option would be to use the table filter and search for Product Code that way, but it's a bit clunky in terms of user experience.
Note: the code used to get the table to display the data is as follows (whether or not I need to alter this as well, not sure). The few things I have tried results in no data in the table:
SELECT *
FROM
{{ mozenda_api_view_css_retool_items.data.Item }};
Well now how did I miss that?! Thanks Stefan - that certainly makes things a lot easier! Points to the Retool team for that. Just one query though: is it possible to use a select box instead of text box, so that search results are displayed as they're being typed? Thanks again.