How to properly retreive a table stored in temporary state?

I successfully stored the data in table1 into temporary state however I am having trouble outputting the results into table2 properly. I have set the value of the table2 as {{ state1.value }}. In table2, the columns are correct however the data is all in one row, with each column having data in an array.

How do I output the data from temporary state into table2 so that it is is a normal table?

Hey @iwbs and welcome to the community! What are you trying to build? Generally temp state is used for storing small values like counters or credentials - not sure I’d recommend it for this use case.

Hi Justin, my goal in using the temp state to store an entire table was to increase the “snappiness” of my apps. Almost all the actions I have in my app are queries which take a second or two to run. When doing a search in a text box it takes some time for the results to appear in the table below since it has to make a round trip to the database. However I noticed that the filter option on tables is instant since the data is already present in the table. My idea was if I could preload the data I am using in a temp table, all the subsequent queries could be made against the temp table data which would make it as fast as filtering on a table.

Is there a better way you would recommend to accomplish my goal?

Gotcha. It makes sense, I just haven’t seen anyone do that before! Your data needs to move a lot (client to Retool server, Retool server to your server, your server back to Retool server, Retool server back to client) so sometimes queries can take a bit longer than you’d hope :confused: No strong alternative at this point.

ANYWAY, I tried to reproduce your issue but no luck. If I store the results of a first table in temp state and then use that temp state’s .value property to populate a second table, it works fine. What’s the exactly issue you’re running into?