How do I create a validation rule?
Validation rule syntax
“<Condition1> <Logicaloperator><Condition2>”; “<message>“
Logical operators are limited to ‘AND’ and ‘OR’.
Example 1
“[Downtime]>0 and IsNull([DowntimeReason])”;"Please select a downtime reason."
This example is on the workspace screen.
IF downtime value is greater than 0
AND downtimereason attribute is NULL
then validation conditions are TRUE
When validation conditions are true, the message “Please select a downtime reason.” displays in a pop-up on the screen.
Example 2
isnull([PEIEquipmentSubType]) AND [PEIAnnualAuditStatus]==28134;"Skid Type must be selected"
This example is on the event screen.
IF PEIEquipmentSubType picklist reading attribute is null
AND PEIAnnualAuditStatus picklist reading attribute has a picklist value with its ID =28134
then validation conditions are TRUE
When validation conditions are true, “Skid Type must be selected” displays in a pop-up on the screen.
On EVENT screens, validations are triggered when you try to save the event without all validations being resolved, and you will not be able to save the event.
Refer to How do I set up formulas using the iPhone Formula Engine? to review functions that you can use and associated constraints.
Related Articles