IF
Usage
Use this function to perform an "IF / THEN / ELSE" expression between cell values
Category | Function | Type | Where to use | Argument statement |
---|---|---|---|---|
FUNCTION | SERVER ROW | CONDITIONAL | .VALUE |
Syntax
1 |
|
Arguments
Condition
any conditional expression or function on storage field values
Value_If_True
any cell value (#Storage_Name.Field_Name.VALUE
or .OLDVALUE
), constant, System Variables or function-returned value
Value_If_False (optional)
any cell value (#Storage_Name.Field_Name.VALUE
or .OLDVALUE
), constant, System Variables or function-returned value
Notes
- The arguments Value_If_True or Value_If_False can be values returned by IF, LIST, LOOKUP or LOOKUPLIST functions
- IF function can be nested in the value arguments
=IF(Condition_1; =IF(Condition_2; Value_1; Value_2); Value_3; Value_2)
- It can be used in value arguments in CLIENT FUNCTION only if its arguments are not value-parameterized (.VALUE) on the cells of the Client rendered records
Return Value
Value
Examples
Example 1
Formula
=IF(#StorageExample.Status.OLDVALUE == "Draft";
=LIST("Draft"; "Submitted");
"Completed"
)
Description
We performed this formula in a Lookup Restriction of a field to restrict the lookup dropdown items list. Formula checks if the cell old values of the field Status in the StorageExample are equal to Draft; if the condition's result is true returns a list of Draft, Submitted, else Completed
Result
Draft, Submitted or Completed
Example 2
Formula
=IF(
=AND(
=CONTAINS(
=LIST($CURRENTUSER.GROUPNAMES);
"Area Manager"
);
=EQ(#StorageExample.Status.VALUE; "Approved")
)
$CURRENTDATE;
null
)
Description
Formula checks if the value Area Manager is contained in the Groups list of the current User (variable) (so if the User is an Area Manager) and (AND function) if the cell values of the field Status in the StorageExample are equal to "Approved"; if the condition's result is true returns current date (variable), else null
Result
Approved or null