Create Validators for Specific Asset Types

You can use the rule String Pattern Using a Controlling Field  to target a specific Asset Type. This will allow you to add rules to your forms that are needed for specific assets. 

How to use Asset Type Validators

In this example, we are targeting the Asset Type Laptop. We need to make sure an assignee is selected to a Laptop that has a status of "Installed"  In the Data Policy section of the form designer, add a rule for Field: Assignee Rule: String Pattern Using a Controlling Field.  After it is added, select it and go to the properties box found at the bottom of the Management Console.

The level is set to error, with a message to inform the data collector that an Assignee must be selected and this rule runs on the form.  In the Rule Settings, we set the Asset Type name to Laptop.  The Controlling field is set to Status.  The Controlling Field Regular Expression is set to "In Use."  Finally the Regular expression (Regex) is set to ^(?!\s*$).+, which is the regex to match any string except NULL, equivalent to "not empty."

 

You can find more examples of regex in our regular expression examples article.

 

 

Have more questions? Submit a request

Comments

Please sign in to leave a comment.