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.
- Business Rule
-
Consume the business rule in the Business Rule box.
- Allow Empty Field
-
Select this option to allow an empty field to be valid. If this option is not selected, and a field is empty, it is marked as invalid.
- Testing
-
You can test the settings of a percentage formatter:
In the Sample Input text box, enter sample text, and click Format. The output appears next to Formatted Text.
If TotalAgility cannot format the sample text, a message appears.
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 Parameter
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.