Hi All,
I have a use case of store certain settings which are specific to my application. Settings can change with environment.
More or less equivalent to app.config.
Can someone please help on this?
Hi Rajat,
If you want specific configurations across different environments, you can use Site Properties.
https://success.outsystems.com/documentation/11/reference/outsystems_language/data/handling_data/site_property/
These will allow you to change values at runtime.
Hope this helps.
Regards,
PZ
Will it be possible to store objects as well in this
eg
environment1 ={config1,config2}
environment2 ={config1,config2}
It is not possible to define a Site Property with a complex structure.
However, you can build a string to store n configurations and then read and work that string through some text actions like StringSplit(), Replace(), etc.
Edit: You can have n site properties per module, example: Config1, Config2, Config3 and set the default values for each configuration.
Thanks a lot
Hello Rajat,
Like Paulo said you cannot store complex objects in a Site property you can however store objects as JSON and then desirializing the value to create your structures. This is not really recommended as a best practice due to the way Site properties work.
To manage Configs, ideally, you would have an entity that holds the values that you need for each environment and fetch them as needed, usually OnApplicationReady. This does require some kind of back office to be able to add/edit records.
Hope it helps!
Paulo Rosário