Rules for Mandatory user-defined fields
When you work with Address Book entries; opportunities; or customer service cases; you can specify that user-defined fields are mandatory if a rule is matched. For example; you can write a rule that makes a user-defined field mandatory only when the category for an Address Book entry is set to “Partner”. When users set the value of the Category field to Partner; they are prompted to set a value for the user-defined field when they save the entry.
A mandatory rule consists of a comparison statement. It may compare a field with a value or with another field. Or it may compare formulas using the same syntax as formula user-defined fields.
You can create comparison statements with the following symbols.
- == to check that two values are equal to each other.
- != to check that two values are not equal to each other.
- to check that the first value is greater than the second value.
- <><></></>to check that the first value is less than the second value.
- = to check that the first value is greater than or equal to the second value.
- <=></=>to check that the first value is less than or equal to the second value.
Comparison statements are often combined with logical operators to add multiple statements together.
- Or – Combines two comparison statements where either one of the statements is true.
- And – Combines two comparison statements where both of the statements is true.
- Not – Negates a comparison statement.
While the comparison statements may be simple; say to compare a field with a value or with another field; you can also write more complex rules. Within the comparison statements; you can include arithmetic operators (+; -; * /) and alphanumeric; date; and numeric functions to create complex formulas.
Mandatory rules using table fields
When you create mandatory rules that compare table fields; the values in the fields are treated like alphanumeric fields.
To compare a table field that contains multiple values; the comparison statement must include the same text that’s displayed in the Maximizer interface; including all values for the field. For example; the statement [Category] == "Partner" will be true only if the only value set in the Category field is "Partner". If the Category field includes the "Distributor" value as well; the rule would validate with the following statement: Category == "Distributor; Partner".
You can use the Search function to locate text in multiple-value table fields.
To check that one of multiple values are set in a table field; use the OR operator in the rule. To check that two (or more) values are set in a table field; use the AND operator in the rule.
Example: Mandatory rule for table field using OR
The following rule validates if either the Distributor or Partner value is set in the Category field:
(Search(“Partner”;[Category]) 0) OR (Search(“Distributor”;[Category]) 0)
Example: Mandatory rule for table field using AND
The following rule validates if both "Distributor" and "Partner" are set in the Category field:
(Search(“Partner”;[Category]) 0) AND (Search(“Distributor”;[Category]) 0)
To set a user-defined field as Mandatory
- In the left pane; under User-Defined Fields; select the category of user-defined fields that you want to work with.
- To search for a field; enter all or part of a field name in the search box and click the search icon. All matching fields in the list are highlighted; and the number of matching fields is displayed.
- Click on the user-defined field.
- In the Mandatory section; select Always mandatory.
- Click Save to save the changes.
To set a user-defined field as Mandatory given conditions
Use this procedure to set a user-defined field as mandatory when a specified rule is matched. This procedure applies only to user-defined fields for Address Book entries or opportunities.
- To search for a field; enter all or part of a field name in the search box and click the search icon. All matching fields in the list are highlighted; and the number of matching fields is displayed.
- Click on the user-defined field.
- In the Mandatory section; select Mandatory based on rule.
- In the text field; enter the rule.
- Click Insert Field to add basic or user-defined fields to the rule.
- Click Save to save the changes.