Additional details regarding rule property paths
SQL Constraints in Property Paths
When defining custom properties, the path to resolve these properties can traverse through a MTM or OTM relation in one or more portions of its path. The syntax to defines these constraints is:
where the SQL_constraint describes some attribute of the field that uniquely identifies that object.
For example, a traversal from contact to site must go through the contact_role table.
A contact can have many contact roles, so a constraint can be used to uniquely define which role is to be used.
To define the Sys Admin role:
To define the Primary Role:
RuleManager supports the use of constraints; however, the following operators within a constraint are NOT supported:
- is null
- is not null
Property Expansion in Rule Conditions
Rules for property expansion in business rule conditions:
- The right hand side can be a literal value.
- The right hand side can be a property (indicated by wrapping in square brackets).
- The left hand side is always considered a property (which gets expanded using the path of the rule property). If the property is not found, it will be interpreted as an empty string.
|Site Name||starts with||Dovetail Software||The condition evaluator will expand the property "Site Name" to its actual value, and compare it to the literal string "Dovetail Software".|
|Site Name||starts with||[My Property]||The condition evaluator will expand the property "Site Name" to its actual value, then expand the property "My Property" to its actual value, and compare the two. If "My Property" is not defined as a property, then the Site Name property will be compared to the literal string "[My Property]" (including the square brackets).|
|Unknown Property||starts with||foo bar||The condition evaluator will expand the property "Unknown Property" to its actual value, and compare it to the literal string "foo bar". If "Unknown Property" is not defined as a property, then it will expand to an empty string, and the empty string will be compared to the literal string "foo bar".|
Property Path Constraints
In a property, the path traverses through relations to reach the correct field for this property. The syntax for defining a property path is:
For example, the Current Owner Phone path for a case looks like:
When traversing through OTM or MTM relations, the result would be multiple sets of data. In order for the property to resolve to a single piece of data, a constraint can be used. The syntax for using a constraint is:
relation(column_name operator value):field
The valid operators for constraints are:
- not like
The following operators are NOT supported in constraints:
- is null
- is not null