QAD 2017 Enterprise Edition > User Guides > Item Attributes and Quality Control > Reference Information > Rule Expression
  
Rule Expression
The system uses an instruction set constructed from a combination of conditions, values, and conjunctions to determine if the value for an attribute result is conforming or non-conforming for these types of specifications. The system uses a rule expression that includes a set of rules constructed from a combination of reserved variable names, conditions, values, and conjunctions. A Rule Expression should normally be constructed by an IT professional or qualified business analyst.
All operators supported in Progress: >, <, <>, =, and, or, () can be used in rule expressions. You can use acronyms in place of operator symbols, such as:
GE (greater than or equal to)
LE (less than or equal to)
GT (greater than)
EQ (equals)
MS (membership)
MM (minimum maximum value)
For example:
attribute_value GE .90 and attribute_value LE 1.00
The following are examples of rule expressions.
character: attribute_value > “aaa”
integer: attribute_value > 10
decimal: attribute_value > 11.23
percentage: attribute_value > 0.99
Note: The system does not support the percentage (%) sign. You must enter a decimal with your value, as in 0.99.
date: date (attribute_value) > 01/01/2012
Note: The date format is based on server setting; for an environment session that is us, the format is mm/dd/yy.
Other rule expression examples include the following:
 
Specification
Rule Expression Syntax
Sample Results
Percentage
attribute_value >= .90 and attribute_value <= 1.00
 
 
User entry of 89.9 and 101 results in non-conformance. User entry of 90, 99.99, and 100 result in conformance,
Percentage
False
Any user entry results in non-conformance.
Percentage
True
All user entries result in conformance.
Character
attribute_value GT “aaa”
User entry of aaa results in non-conformance. User entry of aaa10 results in conformance.
Date
date (attribute_value) > today + 7
With today’s date of July 4, 2013, user entry of Aug 1, 2013 results in conformance. User entry of June 12, 2013 results in non-conformance.
Date
date (attribute_value) > 8/1/2013 and date (attribute_value) < 12/31/2013
User entry of a date that falls between 8/1/13 and 12/31/13 results in conformance. User entry of 7/7/13 or 9/6/2014 results in non-conformance.
Date
date (attribute_value) > today - 30 and date (attribute_value) < today + 30) or date (attribute_value) = 10/01/2012
With today’s date of August 7, 2013, user entry of 8/1/2013 or 10/1/2012 results in conformance. User entry of 7/7/2013 or 9/7/2013 results in non-conformance.
Decimal
attribute_value <= 0.975 and attribute_value >= 0.010
User entry of 0.220 or 0.975 results in conformance. User entry of 0.005 results in non-conformance.
Important: Use the Attribute Specification Preview within the browse collections to confirm that you set up the specification of a Rule Exp (rule expression) attribute correctly.