Formula: IF(statement, value_if_true, value_if_false)
Explanation:
This function allows you to make logical comparisons between a value and what you expect. In its simplest form, the IF function says:
IF(Something is True, then do ….., otherwise do something else)
An IF statement can have two results. The first result is if your condition is True, the second if your condition is False.
Common Uses:
This is one of the most commonly used formulas. The formula is used to test a certain statement and to influence the outcome when the test is true or false.
Variables:
Variable 1: Statement/condition. In this variable, you set the statement that you want to test. Use calculation operators like ‘<’ (smaller than), ‘>’ (larger than) and ‘=’ (equal to) to set the statement. Value type: All value types.
Variable 2: Enter the output when the statement is true. Value type: All value types.
Variable 3: Enter the output when the statement is false. Value type: All value types.
Example(s):
Example 1:
Input: [Stock] Example variable: 2 |
Mapping: If([stock]>0,'Is on stock', 'Is not on stock') |
Output: 'Is on stock' |
Example 2:
Input: [Stock] Example variable: 0 |
Mapping: If([stock]>0,'Is on stock', 'Is not on stock') |
Output: 'Is on not stock' |