Color Coding
The rule syntax is color coded to assist with reading the syntax.
Comments are blue: // This comment continues to the end of this line
Error message definition special character delimiters and booleans are red: “[,],^, |, TRUE, and FALSE.
Error message definition tokens are maroon. ErrMsg1 or LogicBlk3 are common token names.
Error message text is gold, for example, ERROR, the list price field is not a valid field for the commercial lease property type.
All rule syntax is black, .ENTRY. = .EMPTY.
Field names are dark green: PropertyType
Numbers are brown: 999999999.0
Function names are pink: IIF
Quoted strings are olive: */.USERCLASS..IN.('AG','HA','DB'
Rule Example
//[ErrMsg1^ERROR, the list price field is not a valid field for the commercial lease property type.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk3^FALSE]
//[ErrMsg2^ERROR, user does not have the required authority to alter the list price field.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk4^FALSE]
//[ErrMsg3^ERROR, a residential, non-timeshare property must have a close price between $8,888.00 and $1,000,000,000.00.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk5^TRUE|LogicBlk6^FALSE]
//[ErrMsg4^ERROR, a residential, timeshare property must have a close price between $1.00 and $100,000,000.00.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk7^TRUE|LogicBlk8^FALSE]
//[ErrMsg5^ERROR, a non-residential, property must have a close price between $1.00 and $100,000,000.00.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk9^TRUE|LogicBlk10^FALSE]
// Grandfather rule... line below
(/*[LogicBlk1]*/.ENTRY. = .OLDVALUE.).OR.
// Start of rule... First verify that target field is not empty and has changed ...
IIF((/*[LogicBlk2]*/(.NOT.(.ENTRY. = .EMPTY.)).AND.(.NOT.(.OLDVALUE. = .ENTRY.))),
// (THEN)
// If the property type is not commercial lease.
(/*[LogicBlk3]*/.NOT.(PropertyType.IN.('Clse'))).AND.
// If the user has the proper authorization to alter this field.
(/*[LogicBlk4]*/.USERCLASS..IN.('AG','HA','DB','HB','OM','HM','OA','PA','BANGM','BANGN','BANGL','BANGP','BANGQ','BANGG','AS')).AND.
// If property type is Residential, with a property sub-type that is not time-share and the list price is between $8,888.00 and $1 billion.
(((/*[LogicBlk5]*/(PropertyType.IN.('Resi')).AND..NOT.(PropertySubType.IN.('TIME'))).AND.(/*[LogicBlk6]*/(.ENTRY. > 8888.0).AND.(.ENTRY. < 999999999.0))).OR.
// If property type is Residential, with a property sub-type that is time-share and the list price is between $1.00 and $100 million.
((/*[LogicBlk7]*/(PropertyType.IN.('Resi')).AND.(PropertySubType.IN.('TIME'))).AND.(/*[LogicBlk8]*/(.ENTRY. > 1.0).AND.(.ENTRY. < 99999999.0))).OR.
// If property type is not Residential and the list price is between $1.00 and $100 million.
((/*[LogicBlk9]*/.NOT.(PropertyType.IN.('Resi'))).AND.(/*[LogicBlk10]*/(.ENTRY. > 1.0).AND.(.ENTRY. < 99999999.0)))),
// (ELSE)
// Set to true if target field is empty, otherwise false
.ENTRY. = .EMPTY.)