Skip to content

CELLIF

Usage

Use this function to perform an "IF / THEN / ELSE" expression between cell values

Category Function Type Where to use Argument statement
FUNCTION CLIENT CONDITIONAL .METADATA

Syntax

1
=CELLIF(Condition; True_Value; False_Value)

Arguments

Condition
any Client Function or Server Function that returns true or false result not depending from user interface cells values

Value_If_True
any cell value (#Storage_Name.Field_Name.METADATA or .METADATA.ORIGINAL), constant, System Variables or function-returned value

Value_If_False
any cell value (#Storage_Name.Field_Name.METADATA or .METADATA.ORIGINAL), constant, System Variables or function-returned value

Note

  • Condition argument can be also a SERVER FUNCTION only if its argument statement is not value-parameterized (.VALUE) on the cells of the Client rendered records
  • CELLIF function can be nested in the value arguments =CELLIF(Condition_1; =CELLIF(Condition_2; Value_1; Value_2); Value_3; Value_2)

Return Value

Value

Examples

Example 1

Formula
=CELLIF(
=CELLEQ(#StorageExample.Column.METADATA; 1);
"OK";
"KO"
)

Description
Check if the cell values of the field Column in the StorageExample are equal to 1; if the condition's result is true returns OK, else KO

Result
OK or KO

Example 2

Formula
=CELLIF(
=CELLEQ(#StorageExample.Status.METADATA; "Draft");
"red";
=CELLIF(
=CELLEQ(#StorageExample.Status.METADATA; "In Progress");
"yellow";
"green")
)

Description
We preformed this formula in the Layout Cell Background Color of a field. There are only 3 Status allowed: Draft, In Progress and Completed. Formula checks if the cell values of the field Status in the StorageExample are equal to Draft, then color of the cell is red, else if the cell values of the field Status in the StorageExample are equal to In Progress, then the color of the cell is yellow, else is green (so when the Status is Completed)

Result
red, yellow or green