Business rule formatter
Use the Business rule formatter to define formats associating business rules with each field. The rule can also accept additional inputs to perform dependent formatting.
-
Navigate to
.
The Field formatters page appears. The two formatters, Default Amount Formatter and Default Date Formatter appear by default.
-
Click
New.
The New field formatter dialog box is displayed.
- By default, a new formatter is added to your working category. To select a different category for the new formatter, select the Category.
- On the Type list, select Business rule.
-
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:
-
Click the Create new business rule link.
The Create new business rule dialog box is displayed.
- Enter the Name for the business rule.
-
On the Return data type list select the output type.
-
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
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.
-
- 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.
-
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.
If TotalAgility cannot format the sample text, for example, if the sample input text is incorrect, a message appears.
- Click Save.