311
Views
7
Comments
Solved
How to temporarily store a list of records
Application Type
Traditional Web
Service Studio Version
11.54.13 (Build 62526)

Hi,

I'm looking for a way to store a list of records in some temporary variable so that it wouldn't get lost when I traverse across screens within my application. It could be done with the help of the Session variable. However, I'm not sure if it's the right approach to use compound data types such as list as a session variable and this is the reason I'm calling out for some help. Please recommend what would be the best practices to achieve this. I was wondering about entities but I'm not sure how to clear values from the entity when the user session has ended. 

2022-07-11 07-49-33
Alka Asnani
Solution

Hi Vijay rajagopal

Using a Session variable to store a list of records as temporary data is a common and valid approach. Session variables are designed to store data that needs to be persisted across multiple screens or requests within a user session. 

But when using session variable for storing list of records keep the session variable lightweight which means avoid storing large data in session variable store only the necessary data that is required for the current user session. 

Also for clearing the value from session variable you can set a default value or clear the Session variable when the user completes a specific action or leaves a certain screen. 

Also I would suggest If the list of records has complex data structures or requires database operations, consider using structures or entities instead of a simple list. Structures and entities offer additional features such as data validation, integrity, and database integration.  


Hope this helps

Thanks

2022-07-11 07-49-33
Alka Asnani
Solution

Hi Vijay rajagopal

Using a Session variable to store a list of records as temporary data is a common and valid approach. Session variables are designed to store data that needs to be persisted across multiple screens or requests within a user session. 

But when using session variable for storing list of records keep the session variable lightweight which means avoid storing large data in session variable store only the necessary data that is required for the current user session. 

Also for clearing the value from session variable you can set a default value or clear the Session variable when the user completes a specific action or leaves a certain screen. 

Also I would suggest If the list of records has complex data structures or requires database operations, consider using structures or entities instead of a simple list. Structures and entities offer additional features such as data validation, integrity, and database integration.  


Hope this helps

Thanks

2025-12-04 09-01-03
Kiet Phan
Champion

Should we store it in Local Storage? 

There is a Forge library for Reactive Local Storage:

https://www.outsystems.com/forge/component-overview/6978/local-storage-reactive

2023-10-21 19-42-11
Tousif Khan
Champion

Hi,

The post is tagged as Traditional Web, make sure to read the full post.

Thanks

2025-12-04 09-01-03
Kiet Phan
Champion

oh, I didn't realize that, thanks for reminding !!

2024-09-12 02-43-38
Deepsagar Dubey

Hi Vijay, 

Create a session variable of Text Type,

Then convert your list to JSON and when you want to use it again convert JSON to list,

I hope it'll help you.

Thanks
Deep

2024-09-12 02-43-38
Deepsagar Dubey

I hope you are aware about these two Outsystems tool - 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.