Resource: Property, Field : YearBuilt
Description
YearBuilt must be after 1800 and before 3 years in the future.
Error Messages
1) ERROR, 'year built' field must be greater or equal to 1800 and the current year, plus 3.
Fields referenced within this rule
Syntax with comments and error messages
//[ErrMsg1^ERROR, 'year built' field must be greater or equal to 1800 and the current year, plus 3.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk3^FALSE]
// Grandfather clause...
(/*[LogicBlk1]*/(.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = 'I')).AND.(StandardStatus.IN.('A','P')))).OR.
// If entry is not empty and has changed...
IIF((/*[LogicBlk2]*/(.ENTRY. != .EMPTY.).AND.(.ENTRY. != .OLDVALUE.)),
// Then check if entry occurred on or after 1800 and entry is not more than three years in the future.
(/*[LogicBlk3]*/((.ENTRY. >= 1800).AND.(.ENTRY. <= (YEAR(.TODAY.) + 3)))),
// Else accept if entry is not empty.
.ENTRY. = .EMPTY.)
// (.ENTRY. = .EMPTY.) .OR. ((.ENTRY. >= 1800) .AND. (.ENTRY. <= (YEAR(.TODAY.) + 3))) .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.IIF(((.ENTRY. != .EMPTY.).AND.(.ENTRY. != .OLDVALUE.)),(((.ENTRY. >= 1800).AND.(.ENTRY. <= (YEAR(.TODAY.) + 3)))),.ENTRY. = .EMPTY.) / / (.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = 'I')).AND.(StandardStatus.IN.('A','P')))
Rule Unique ID
6c4a11ba-0d62-4a56-9b90-29cc6136de05
Rule Number
217