I have a table and three buttons and three queries. I want to populate the table based on what button is clicked. I did look at the previously answered question around this based on a dropdown ( Run dynamic query based on selection in dropdown to populate a table) but not sure how to do that with buttons (think of it like a menu / sidebar). Thanks!
@Sandeep You can check out a sample app here which does this using tabs and buttons- Appsmith
you can fork the app
Thanks @dancia. Although, this looks like we are using multiple tables for showing results of queries. I was hoping we would have just one table and multiple buttons assigned to various queries. Would that be possible at all?
You can use the Appsmith storeValue function as an alternative - https://docs.appsmith.com/framework-reference/store-value
The logic would be something like this. Use one store variable to store a flag value based on the button that was clicked. Write a JS function to conditionally run and store the results of the queries in another store variable based on whichever button was clicked. On the Table widget Default Value property bind the value of the second store variable using {{appsmith.store.var2}}