The update setting task allows for global settings in the application to be set and/or updated. Global settings are referred to as session variables.
Changing a session variable may trigger further changes. For example, if field calculations refer to session variables, their behaviour change. Similarly, dynamic map feedback, custom panels and other features of the application may update themselves in response.
To set a session variable, the name of the session variable must be provided along with a script to provide the value.
Only simple types can be stored in session variables: text, numbers, dates, geometries, features. FeatureSets may not be stored.
An alternative to using Session State, is to use the low level State
function. This will store values without causing updates across the application.