Global parameters

As the name suggests, K2 Business Apps supports some parameters that can be created on a global level within the app. The parameters will be used in two cases: when a form is opened and when a SmartObject is executed. Global parameters have the second to lowest priority with respect to other parameter options. They will supersede the default parameter on forms, but they will be overwritten by static parameters specified in your form configuration, or values set from the K2 rules. You could describe them as “user specific environment fields”.

Form Parameters When a form is opened, the parameters are checked. If a global parameter with the same name exists and is applicable to forms, the value will be set before the form actually opens and thus before the “When the Form is Initializing” rule is executed.

SmartObject Inputs When a SmartObject is executed, K2 Business Apps checks if the input properties are set as global parameter. If one is, the value will be set before the values of the “Execute a SmartObject” rule are set.

Get and Set Global Parameters

The K2 Business Apps control can be used to get and set global parameters by using the methods “Get Global Parameter” or “Set Global Parameter”. In order to set one, you need to provide the name of the global parameter.

Warning

Existing global parameter with the same name will be overwritten.