Want my table to return data from SQL query using data entered into search box of table.
Tried query like:
select * from mydatabase.table where name ilike {{"%" + appsmithtable.searchText + “%”}}
When run this query it brings back all data from the database and the search box of the table does not send the query to the database to get new data as per value in search box.
How can I make this work?
@ebecker1 here’s a working sample: Appsmith
To play with the sample, enter search values such as Lisa
, Homer
, Marge
, or Bart
.
Here’s the sample app you can download and play with:
Let me know if you have any questions.
I see the application you made, but the google drive file deny me access, so I requested that you grant me access to the drive so I can download the app. Thanks.
I’ve updated the permissions on the link, please try now.
I made some progress. Created a text input box and referenced that input value to the query as follows:
SELECT * FROM “mydatabase”.“mytable” where myvalue = {{Input1.text}}
The query works when run, it uses the current value in the input box.
However, I have my table linked to this Query1 and it does not populate the table.
The table data source shows {{Query1.data}} and when I hover over that it shows the data that should populate the table, but there is nothing in the table.
Is there something more I should do to get the table to update?