Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

If

Use this function to carry out a set of instructions if a condition is TRUE.

Do not confuse the If function with the When function:

Function

Description

If

To carry out a set of instructions if any value of a symbol matches a condition.

When

To carry out a set of instructions each time the contents of a cell match a condition.

Copy

Syntax

IF Condition
Instructions 
[ELSE
Instructions2]
END IF                    

where:

  • Condition is a test to determine if a relationship is true or false. Your system applies the If condition to all data cells, and is considered TRUE if the condition is TRUE for any single value. (You can also compare a constant against another constant.) If Condition is TRUE, your system carries out Instructions.
  • Instructions is a set of instructions that your system carries out if Condition is TRUE.
Copy

Syntax example

IF VALUE (WDGTMFG, A20000, AYR01) LT 0.2 "*" VALUE(WDGTMFG, A99999, AYR01)
    Div = 0.1 "*" A99999
END IF

Published:

If

Use this function to carry out a set of instructions if a condition is TRUE.

Do not confuse the If function with the When function:

Function

Description

If

To carry out a set of instructions if any value of a symbol matches a condition.

When

To carry out a set of instructions each time the contents of a cell match a condition.

Copy

Syntax

IF Condition
Instructions 
[ELSE
Instructions2]
END IF                    

where:

  • Condition is a test to determine if a relationship is true or false. Your system applies the If condition to all data cells, and is considered TRUE if the condition is TRUE for any single value. (You can also compare a constant against another constant.) If Condition is TRUE, your system carries out Instructions.
  • Instructions is a set of instructions that your system carries out if Condition is TRUE.
Copy

Syntax example

IF VALUE (WDGTMFG, A20000, AYR01) LT 0.2 "*" VALUE(WDGTMFG, A99999, AYR01)
    Div = 0.1 "*" A99999
END IF

For an optimal Community experience, Please view on Desktop