ACCEPT

Resource: Property, Field : NumberOfUnitsTotal

Description

NumberOfUnitsTotal must be a valid value. The value is also the sum of 'unit type units total' and 'property units'.

Error Messages

1) ERROR, 'number of units total' field must have a value greater than 0.
2) ERROR,  'number of units total' field must equal the sum of all 'property units'.
3) ERROR, 'number of units total' field is invalid for the property type set.

Fields referenced within this rule

NumberOfUnitsTotal 

PropertyType 

StandardStatus 

Syntax with comments and error messages

//[ErrMsg1^ERROR, 'number of units total' field must have a value greater than 0.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk3^FALSE|LogicBlk4^TRUE]
//[ErrMsg2^ERROR, 'number of units total' field must equal the sum of all 'property units'.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk5^FALSE|LogicBlk6^TRUE]
//[ErrMsg3^ERROR, 'number of units total' field is invalid for the property type set.|LogicBlk1^FALSE|LogicBlk2^TRUE|LogicBlk4^FALSE|LogicBlk6^FALSE]
// Grandfather rule... line below
(/*[LogicBlk1]*/(.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = 'I')).AND.(StandardStatus.IN.('A','P')))).OR.
// If the entry is not empty...
IIF((/*[LogicBlk2]*/.ENTRY. != .EMPTY.),
// Then check whether there is at least one unit and the property type is 'residential' or residential lease' or...
((/*[LogicBlk3]*/FLOAT(.ENTRY.) > FLOAT(0.9)).AND.(/*[LogicBlk4]*/PropertyType.IN.('Resi','Rlse'))).OR.
// the sum of the 'unit type units total' of all property unit resource children of the listing equals the entry value and the property type is 'residential income'.
((/*[LogicBlk5]*/RESOURCE("SUM_FIELDS","NEW","PropertyUnits","UnitTypeUnitsTotal") = .ENTRY.).AND.(/*[LogicBlk6]*/PropertyType.IN.('Rinc'))),
// Else accept the entry if empty.
.ENTRY. = .EMPTY.)
// ((.ENTRY. = .OLDVALUE.) .AND. .NOT.(((LAST StandardStatus = .EMPTY.) .OR. (LAST StandardStatus = 'I')) .AND. (StandardStatus .IN. ('A','P')))) .OR.
// ((FLOAT(.ENTRY.) > FLOAT(0.9)) .AND. (PropertyType .IN. ('Resi','Rlse'))) .OR.
// ((RESOURCE("SUM_FIELDS","NEW","PropertyUnits","UnitTypeUnitsTotal") = .ENTRY.) .AND. (PropertyType .IN. ('Rinc'))) .OR.
 /  / (PropertyType.IN.('Manu','Land','Comm','Clse','Busop','FARM'))

Syntax only

((.ENTRY. = .OLDVALUE.).AND..NOT.(((LASTStandardStatus = .EMPTY.).OR.(LASTStandardStatus = 'I')).AND.(StandardStatus.IN.('A','P')))).OR.IIF((.ENTRY. != .EMPTY.),((FLOAT(.ENTRY.) > FLOAT(0.9)).AND.(PropertyType.IN.('Resi','Rlse'))).OR.((RESOURCE("SUM_FIELDS","NEW","PropertyUnits","UnitTypeUnitsTotal") = .ENTRY.).AND.(PropertyType.IN.('Rinc'))),.ENTRY. = .EMPTY.) /  / (PropertyType.IN.('Manu','Land','Comm','Clse','Busop','FARM'))

Rule Unique ID

012b6650-954f-4e22-a133-08c842294320

Rule Number

155