Same page action
Use the Same page action to initialize a value for a field or give a default value at runtime.
You can specify the target and source fields; the value from a source field or variable is populated at the target field as the default value.
Configure expressions in the Same page action so that you perform some simple logic. An expression is a statement composed of one or more literal values, operators, functions, and variables that are evaluated by the rules engine to produce a single value. You can use constant values, form controls, control properties, form variables, global variables, and functions (Math, Text, and Date) to define an expression.
-
On the form modeling bar, click
Actions and click
New.
The New action dialog box is displayed.
- On the Type list, select Same page.
- Change the default Name (SamePage1) to something meaningful.
- Optional. Enter a Description for the action.
- Optional. Select Multilingual to configure a unique action for each language separately. See Configure multilingual actions.
-
To specify the item to change at runtime, do the following:
- Click
-
On the
Target list, select a form control, form variable, or global variable.
-
The Array variable type cannot be mapped.
-
The Table control and columns cannot be mapped, but the column properties can be mapped.
-
The Button control and its Text property can be mapped which allows dynamically updating the text on a button.
-
The File upload control and its properties such as FileLocation and FileSize cannot be mapped in the Target fields, as these properties are read-only.
-
-
Do one of the following for
Source/Value:
-
On the Source/Value list, select a form control, form variable, or global variable.
-
Click and enter a static value.
-
Click fx and do the following:
-
Right-click on the rule editor and configure an expression using the form controls, form variables, global variables, and/or functions (Math, Text, and Date).
-
Click Validate.
The expression is validated. An error appears if the expression is not valid. The expression is added to the main list only if is valid.
-
You cannot map a Table control, but the column and column properties within the Table control can be mapped. -
-
Click
Save.
The target and the source/value are displayed. When the expression is too long, the complete expression is not displayed; instead, the word Expression in italics is displayed. You can edit the row to view the expression.
-
Click
Add.
The newly created action appears on the Actions page.
-
The form control or control property, form variable, or global variable used in the expression are displayed in the form associations and cannot be deleted.
-
For a multi-lingual action, the configuration for the expression is the same for each language but you can update the source to be a different expression or just select a control/variable or provide an inline value.
-
- Associate the action with the control to trigger this action. See Configure actions for form control events. Alternatively, to call this action for a form event, associate the action with the form. See Associate an action with a form.
See also: