Create a string and nullable string variable

A string variable is used to hold text value that is used in a process, form, and across TotalAgility.

You can also define form display properties to specify the type of control that will be used to represent the variable at runtime in a Create new job or Activity forms that are either built or generated dynamically.

Procedure
  1. Open the process map in which to create the variable.
  2. On the process modeling bar, select Variables and select New.

    The New variable dialog box is displayed.

  3. Enter a unique Name for the variable.
    By default, the name of the variable becomes the ID of the variable; however, you can change the ID if needed.
  4. On the Type list, select String or Nullable string. (Default: String)
  5. Optional. To use the variable for process initialization, select Initialization.
  6. You can use either a Static value or an Expression for the variable Value.
  7. Optional. To clear a variable's value when a job is archived, select Clear on archive. (Default: Selected)

    When selected, the variable value is cleared when the job is moved to finished jobs. This helps reduce database size for variables that hold large amounts of data.

    • For String variables, the value is set to an empty string when archived. For Nullable String variables, the value is set to Null.

    • This property is not available for business rules or custom services, as job history is not recorded for these.

    • If a job is restarted after being archived, cleared variable values are not restored.

    • The history of tracked variable changes is also cleared for variables configured with this property.

    • This property can be modified at any time during the process design.

    • This property cannot be modified in skins.

    • When upgrading or importing a process from an earlier version, this property is set to false (not selected) by default.

    • When an API retrieves variable values for an archived job, it returns empty values for variables configured with this property.

  8. Configure the Variable display properties.

    Property Description
    Control type

    Select one of the control types:

    • Single line: Adds a text box for single-line fields, such as name. (Default: Single line)

    • Multi line: Adds a multiline text box, such as customer address.

    • Drop down: You can either select an existing lookup or enter static data for the Data source.

      To enter static data, select , add a Name, and then select Add. To make it a default value, select Default.

    • Email: Adds a text box control set to the Email field type.

    Max number of characters The maximum number of characters allowed to enter in the control selected above.
    Mandatory Specify whether the control is mandatory.

    On generating a Create new job or activity forms for a process that has an initialization variable set with display properties, the configured properties are reflected in the corresponding controls added to the form.

    • This applies to capture and non-MFP forms only.

    • The Control type property does not apply to business rule or custom services as they do not have forms associated with them.

  9. Select Add and close.

    The New variable dialog box is closed.

  10. Save the process.