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.

You can configure expressions in a 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.

  1. On the form modeling bar, click Actions and click New.

    The New action dialog box is displayed.

  2. On the Type list, select Same page.
  3. Change the default Name (SamePage1) to something meaningful.
  4. Optional. Enter a Description for the action.
  5. Optional. Select Multilingual to configure an unique action for each language separately. See Configure multilingual actions.
  6. To specify the item to change at runtime, do the following:
    1. Click
    2. On the Target list, select a form control, form variable, or global variable.
      • The Array variable type is restricted from mapping.

      • 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.

    3. 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:

        1. Right click on rule editor and configure an expression using the form controls, form variables, global variables and/or functions (Math, Text and Date).

        2. 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.

      Note You cannot map a Table control, but the column and column properties within the Table control can be mapped.
    4. 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.
  7. 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 the you can update the source to be a different expression or just a select a control/variable or provide an inline value.

  8. 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.