ACCEPT

Resource: Property, Field : CoListAgentStateLicense

Description

CoListAgentStateLicense cannot have the same digit repeat excessively.

Error Messages

1) ERROR, the 'Buyer Agent State License' field format is invalid.
2) ERROR, the 'Buyer Agent State License' field is only valid when the 'standard status' field is Active.

Fields referenced within this rule

CoListAgentStateLicense 

StandardStatus 

Syntax with comments and error messages

//[ErrMsg1^ERROR, the 'Buyer Agent State License' field format is invalid.|LogicBlk1^FALSE|LogicBlk2^FALSE|LogicBlk3^TRUE|LogicBlk4^TRUE|LogicBlk5^FALSE]
//[ErrMsg2^ERROR, the 'Buyer Agent State License' field is only valid when the 'standard status' field is Active.|LogicBlk1^FALSE|LogicBlk2^FALSE|LogicBlk3^TRUE|LogicBlk4^FALSE]
// Admin bypass logic block - line below
(/*[LogicBlk1]*/.USERCLASS..IN.('BANGG','BANGP','BANGQ')).OR.
// Grandfather logic block - line below
(/*[LogicBlk2]*/(.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus.IN.('I'))).AND.(StandardStatus.IN.('A','P')))).OR.
// If not empty and has changed...
IIF((/*[LogicBlk3]*/(.ENTRY. != .EMPTY.).AND.(.ENTRY. != .OLDVALUE.)),
// Then, check that the standard status is active and the format of the state license does not contain excessive repeats of digits
(/*[LogicBlk4]*/StandardStatus.IN.('A')).AND.(/*[LogicBlk5]*/.NOT.(MATCH('(^1{7,20}$)|(^2{7,20}$)|(^3{7,20}$)|(^4{7,20}$)|(^5{7,20}$)|(^6{7,20}$)|(^7{7,20}$)|(^8{7,20}$)|(^9{7,20}$)|(^0{7,20}$)',TRIM(.ENTRY.)))),.TRUE.)
//(.USERCLASS. .IN. ('BANGG','BANGP','BANGQ')) .OR.
//(IIF((UPPER(CHAR(StandardStatus)) .IN. ('A')), .NOT.(MATCH('(^1{7,20}$)|(^2{7,20}$)|(^3{7,20}$)|(^4{7,20}$)|(^5{7,20}$)|(^6{7,20}$)|(^7{7,20}$)|(^8{7,20}$)|(^9{7,20}$)|(^0{7,20}$)',TRIM(.ENTRY.))), .TRUE.)) .OR.
 /  / ((.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = ('I'))).AND.(StandardStatus.IN.('A','P'))))

Syntax only

(.USERCLASS..IN.('BANGG','BANGP','BANGQ')).OR.((.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus.IN.('I'))).AND.(StandardStatus.IN.('A','P')))).OR.IIF(((.ENTRY. != .EMPTY.).AND.(.ENTRY. != .OLDVALUE.)),(StandardStatus.IN.('A')).AND.(.NOT.(MATCH('(^1{7,20}$)|(^2{7,20}$)|(^3{7,20}$)|(^4{7,20}$)|(^5{7,20}$)|(^6{7,20}$)|(^7{7,20}$)|(^8{7,20}$)|(^9{7,20}$)|(^0{7,20}$)',TRIM(.ENTRY.)))),.TRUE.) /  / ((.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = ('I'))).AND.(StandardStatus.IN.('A','P'))))

Rule Unique ID

7db4898c-74b1-4d71-853d-e080f4f88faf

Rule Number

45