Hey All,
I'm new to retool and somewhat new to building apps with javascript. I am building a very simple inventory app. I have 3 different Postgres queries set up so the user can search based on conditions...This works fine, but I would like to populate a Table1 with the results of the most recent query of the 3. Ideally if you hit Submit1 Submit2 or Submit 3 it selects the correct query to populate Table1 (I'm trying to avoid multiple hidden tables, seems not pro) I have created a state1 and pass a number to it to help choose programatically which query populates the Table1.
I feel like I don't understand where to plugin the following code...Can anybody help me out?
ADAM
switch({{ state1.value }}) {
case 1:
{{ base_alice_query.data }}
break;
case 2:
{{ base_column_alice_query.data }}
break;
case 3:
{{ base_location_alice_query.data }}
break;
}