ACCEPT

Resource: Property, Field : ListAgentStateLicense

Description

ListAgentStateLicense must be valid.

Error Messages

1) ERROR, 'state license' field may only be updated if the standard status is not 'closed'.
2) ERROR, 'state license' format is invalid, unexpected number of repeated digits.

Fields referenced within this rule

ListAgentStateLicense 

StandardStatus 

Syntax with comments and error messages

//[ErrMsg1^ERROR, 'state license' field may only be updated if the standard status is not 'closed'.|LogicBlk1^FALSE|LogicBlk2^FALSE|LogicBlk3^TRUE|LogicBlk4^FALSE]
//[ErrMsg2^ERROR, 'state license' format is invalid, unexpected number of repeated digits.|LogicBlk1^FALSE|LogicBlk2^FALSE|LogicBlk3^TRUE|LogicBlk5^FALSE]
// Grandfather logic block
(/*[LogicBlk1]*/(.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = ('I'))).AND.(StandardStatus.IN.('A','P')))).OR.
// Administrator bypass
(/*[LogicBlk2]*/.USERCLASS..IN.('BANGG','BANGP','BANGQ')).OR.
// If entry is not empty and has changed...
IIF((/*[LogicBlk3]*/(.ENTRY. != .EMPTY.).AND.(.ENTRY. != .OLDVALUE.)),
// Then check whether standard status is 'closed' and...
(/*[LogicBlk4]*/.NOT.StandardStatus.IN.('S')).AND.
// entry does no have digits repeating 7 to 20 times.
(/*[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.))),
// Else ACCEPT the empty entry.
.ENTRY. = .EMPTY.)
// (.USERCLASS. .IN. ('BANGG','BANGP','BANGQ')) .OR.
// IIF((StandardStatus .IN. ('S')),(.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

((.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = ('I'))).AND.(StandardStatus.IN.('A','P')))).OR.(.USERCLASS..IN.('BANGG','BANGP','BANGQ')).OR.IIF(((.ENTRY. != .EMPTY.).AND.(.ENTRY. != .OLDVALUE.)),(.NOT.StandardStatus.IN.('S')).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.))),.ENTRY. = .EMPTY.) /  / (.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = ('I'))).AND.(StandardStatus.IN.('A','P')))

Rule Unique ID

6ed7846a-ea7e-41ce-8acc-4f178e002209

Rule Number

114