Logic for Glossary Variables, Banners, or Filter in Setup|Tables and Edit Row in Setup|Tables can compare field code values.
Variable data syntax: VARIABLE OPERATOR VARIABLE
Variable data examples:
Example 1: Compare two variables as condition for ASSIGN
IF AMOUNT_A < AMOUNT_B ASSIGN AMOUNT_C = (7)
meaning, ‘If the code value in variable AMOUNT_A is less than the code value in variable AMOUNT_B, move a code 7 to variable AMOUNT_C.’
Example 2: Compare two variables for row logic
Q1A = Q2A
meaning, ‘If the code value in variable Q1A equals the code value in variable Q2A, the statement is true.’
Example 3: Compare two variables with additional logic for a banner column
{CHILD1_AGE < CHILD2_AGE} and Q1 (7)
meaning. ‘If the code value in variable CHILD1_AGE is less than the code value in variable CHILD2_AGE and Q1 is a code 7, the statement is true.’
ASCII data syntax: RECORD/COLUMN OPERATOR RECORD/COLUMN
ASCII data examples:
Example 4: Compare two fields as condition for ASSIGN
IF 1/34:2 < 1/44:2 ASSIGN 1/78 = (7)
meaning, ‘If the code value in record 1, columns 34 and 35 is less than the code value in record 1, columns 44 and 45, move a code 7 to record 1 column 78.’
Example 5: Compare two fields for row logic
5/23:3 = 6/23:3
meaning, ‘If the code value in record 5, columns 23 - 25 equals the code value in record 6, columns 23 - 25, the statement is true.’
Example 6: Compare two fields with additional logic for a banner column
{2/10 < 2/11} and 1/5 (7)
meaning. ‘If the code value in record 2, column 10 is less than the code value in record 2, column 11 and record 1, column 5 is a code 7, the statement is true.’
Related topics: