Hi, I have question, I already read the forum : https://outsystems.com/forums/discussion/41357/encrypt-hide-input-parameters-in-url/
But in my case, the requirement is not to store data in database and if possible, avoid encryption but the URL will be too long since the number of parameter that need to pass is around 20 params.
Thank you in advance for any ideas.
Hi,
you can serialize all parameters into a single string using Base64 encoding.
Sorry, if I encode the JSON string to Base64 format, it still will be too long.
Hello,
Passing 20 input parameters to screen giving indicator that there is something wrong. I think you need to review your business requirements again and your data model.
In most cases we need to pass 1,2 or 3 input parameters one of them will be Id or unique identifier that I can use to retrieve data from data entities and fetch other required parameters using aggregates or Data Fetch actions
I agree with Mostafa, 20 parameters is huge number to be passed to a screen, this is not a recommended practice. Usually you would pass couple of parameters that are then used by target screen to fetch the desired information from database.
Probably if you share more details about your use case, you are likely to get better assistance.
Thanks,
Junaid
I already propose the idea of fetching the desired information from database but the requirement stated that they preferred to not use databases.
This is the reason why I am seeking assistance on how to best accomplish this task.
use session while use over 3 parameters.
I have the idea to use REST API to post the data but I have problem here when I want to retrieve back the data from structure. May I know is there any other opinion on how to solve this or maybe other good ideas?This is Expose API Server Action
Then this one is for me to retrieve back the data from the structure.
HI, @Nursyafira binti Jamil
I never seen a 20 parameters for transfer data between screen's is not a best practices.
If it's a business requirement, Well you can use the clients variables so you can avoid the screen input parameter's and decrease URl.
Sorry but I still new to OutSystems, may I know if there is example that I can refer too?
Check the Oml there is a example how to use.
Instead of client variables i will suggest create entity which a stores a temporary data, but you just mentioned that shouldn't use databases.
Your idea on API will not work because data has to store when retrieving back.
It's okay, thank you for the suggestion.I am looking for the advise if there is any alternative in order to handle this method instead of creating entity which store the temporary data.
Yes, Use client variables, where variable can handle more then 2Mb to 10MB based on the browsers.
Check the pervious message there is a OML with example how to use client variables when navigating to avoid the screen input parameters.
Let me know, if still facing the issue with limited capacity of Client variable.
May I know if is it possible to use client variable if you want to pass to screen belong to different module?
Yes, you can do that buy using a client Action and make it has a public "Yes" and you can use it in different modules by adding dependence's.
Batter create a Separate Module for handling client variables for use case different modules.
Understand and I tried to implement it, this is my client action :
When I debug, there is no problem to pass the data
And how I call back to retrieve back, I only get the default value instead the desired value that I want to pass :
Without looking into your code i couldn't tell exactly where is the issue.
Better create a separate module and follow below steps.
1.Create a client variable.2.Create two client actions (To store data & To GetData) make sure both action are public.3.Use the client action where you required.
Note: Make sure the string size is less then 10MB