Business rule formatter

Use the Business rule formatter to define formats associating business rules with each individual field. The rule can also accept additional inputs to perform dependent formatting.

Note If a field, such as field1 has a dependent formatter mapped to it and relies on the inputs of another field, such as field2, you can still format field1 but the formatted value of field1 may not be passed to the formatter in field 2.

  1. Navigate to Capture > Field formatters.

    The Field formatters page appears. The two formatters, Default Amount Formatter and Default Date Formatter appear by default.

  2. Click New.

    The New field formatter dialog box is displayed.

  3. By default, a new formatter is added to your working category. To select a different category for the new formatter, select the Category.
  4. On the Type list, select Business rule.
  5. On the Business rule list, select an existing business rule or create a new business rule.
    • Select a business rule.

    • To create a new business rule:

      1. Click the Create new business rule link.

        The Create new business rule dialog box is displayed.

      2. Enter the Name for the business rule.
      3. On the Return data type list select the output type.

      4. Click OK.

        A business rule is created with the correct initialization parameters, input and output variables and a synchronous node within the process.

    A business rule used in a Business rule formatter must have the following parameters as input or output.

    • Input parameter

      Parameter Data type Description

      FieldText

      String

      The existing field text.

      X

      X

      Any additional inputs.

    • Output parameters

      Note The rule output parameters must be in order given below.

      Parameter Data type Description

      IsValid

      Boolean

      Whether the business rule formatted the field correctly.

      ErrorMessage

      String

      The message to display if formatting failed.

      FormattedText

      String

      The newly formatted field text.

      FormattedValue

      Boolean/Numeric/Date

      The newly formatted field value should display the corresponding field type. For example, if the date field is used in a business rule, it may return the extraction value as 27052013. However, when the Business rule formatter is used, the formatted value is displayed as 27/05/2013.

  6. Select Allow empty field to allow input fields to the business rule formatter to be empty. If clear, requires all input fields to contain a value.
  7. Enter the sample text in the STR field. The output appears in the Target text field. For example, if Format = DD/MM/YYYY and Date Delimiter = “_”, and sample text = 11/06/2015, the Target text appears as 11-06-2015.
    Note If TotalAgility cannot format the sample text, for example, if the sample input text is incorrect, a message appears.
  8. Click Save.