Adding a System Field
Adding a Group
Specifying Validations for a Field
In case where validation needs to be done for the value of a field, it can be specified along with the field definition. The entry for field
<SwiftSystemFieldDef
a)S = system
b)U = urgent
c)N = normal
</Description>
<Validations>
<Validation>
<formula>In($value, "S", "U", "N")</formula>
<actionmessage>Invalid Message Priority '" + $value+"'"</actionmessage> </Validation>
</Validations>
</SwiftSystemFieldDef>
The allowed values for the field are ‘S’, ’U’ and ‘N’. This has been specified using the ‘Validation’ tag under ‘Validations’ tag. Any formula that can be used in ‘Designer’ can be specified in the ‘formula’ tag. Error code and action message can also be specified. The error code and action message specified will be set in the exception that occurs when the validation specified fails.
The ‘Validations’ tag is optional. Use it only if any additional validation needs to be done.
Note:
The field value can be accessed only using the ‘$value’ literal.
See Also:
Specifying Validations for a