Search history for input field

Hi everyone!

In the app I am making, I have an input field I'm using to search in 3 different tables. Within these tables, you can then click on a row to go to an overview screen with more information on that thing.

What I would want to add is a little overview of previously searched things. This would be depending on what user is using the app (so using the retool database could not be used to my knowledge)
How could I go and implement this? Is there something already baked into retool for this?

Thanks!

Not sure about baked in history but you could use a temp variable for the user session or store the search in a table in a db....

You could definitely still use the Retool DB for this, just create a table with columns like id, timestamp, search, and user. Then you can pick off the most recent 5, 10 whatever, by user.

Hi @ScottR, What do you mean with temp variables? Do you mean the variables you can make in the app itself of the general variables over you environment?

Thanks for your proposition @MikeCB I did not think of that indeed, it just seems 'difficult' to then, for each search, look up how many searches that user has to delete the older ones and make sure the databse doesn't explode with rows of outdated information.

@Allys1098 I would say only for the session in the app itself, yes if your concerned about data piling up....

1 Like

Fair enough, I still need to get used to global variables being a thing with the multipage apps now, thanks for your help!

1 Like