Procedures
Create a new validation rule trigger
- On the Admin home page, select Models and select the model you want to add a validation rule.
- Select the Validation rule tab and select Create.
- In the Validation title box, type a name for your validation rule.
- From the Validation for list, select when you want the validation to trigger, when a user creates, updates, or deletes a model property's value in a form, and then select ADD.
Configure your validation
- Select the validation you just created.
- On the validation hierarchy view under your trigger, select the plus sign to add a validation action:
Add if/then branch
You can select the conditions you want to be met for your message to appear to the user.
- Under the Conditions section:
- Meet All of the following conditions (and) - If you want the property value to meet EVERY condition.
- Meet AT LEAST ONE of the following conditions (or) - If you only want the property value to meet ONE OF the conditions.
- From the Property list, select the model's property.
- From the Criteria list, select the condition you want the property value to meet.
- In the Value box, enter the property's value you want the condition to meet. For lookup properties, you can select a lookup option entered when you added the property to the model. For foreign key properties, you can select any values against the default label property of the linked model. However, if there is nothing to select, there might not be any values for the property.
- From the Add child actions to list, select which branch you want to add the child actions to:
- True - Adds child actions if the property value meets the conditions stipulated.
- False - Adds child actions if the property value doesn't meet the conditions stipulated.
- Select ADD.
Retrieve Information
You can use this action to retrieve a specific property to use in the if/then branch action.
- From the Retrieve from model list, select the model you want to retrieve information to use in your workflow.
- The Label updates automatically, but you can change this.
- Optionally, under the Conditions section:
- Meet All of the following conditions (and) - If you want the property value to meet EVERY condition.
- Meet AT LEAST ONE of the following conditions (or) - If you only want the property value to meet ONE OF the conditions.
- From the Property list, select the model's property.
- From the Criteria list, select the condition you want the property value to meet to hide the block.
- In the Value box, enter the property's value that you want the condition to meet. You can use the User ID, any custom user properties, or any property on the submitted model where the datatype matches. For example, you can choose text values for a text condition, or for a date condition, you can choose date values. If you have a retrieved information workflow action before this one, you can choose any of those. If you have multiple retrieve information actions for the same model, each one is numbered, for example, Retrieve Person 1 Start Date, Retrieved Person 2 Start Date, and so on.
- Select ADD.
Raise error message
- As soon as one error is raised, no more validation rules run. You can write your own error message to show users. It's better to tell users what they need to do to correct the error. You can see Microsoft's guide, Error Messages (Design basics).
Send warning message
- You can use the expression builder to create a specific warning message. See our article, Expression builder.
Send info message
- You can use the expression builder to create a specific information message. See our article, Expression builder.
Send success message
- You can use the expression builder to create a specific success message. See our article, Expression builder.
Activation
- Turn on your validation by selecting ACTIVATE.
Order your validations
- On the Validation rules page, select REORDER.
- In the Re-order validation dialog box, drag and drop the validations into the order that you want.
- Your order is saved automatically. You can close the dialog box.