IFS() |
|
|
The IFS() function returns a dynamic array constructed from elements chosen from two other dynamic arrays depending on the content of a third dynamic array.
Format
IFS(control.array, true.array, false.array)
where
The IFS() function examines successive elements of control.array and constructs a result array where elements are selected from the corresponding elements of either true.array or false.array depending on the control.array value.
Note that if control.array has only one element but one or both of true.array and false.array have more than one element, the IFS() function has no way to determine whether it should be extracting a field, value or subvalue from the data. In this situation, appending the relevant mark character to control.array would make the intention clear.
Example
A contains 1VM0VM0VM1VM1VM1VM0 B contains 11VM22VM3VM4VM91VM36VM7 C contains 14VM61VM2VM0VM35VM18VM3
D = IFS(A, B, C)
D now contains 11VM61VM2VM4VM91VM36VM3
See also: ANDS(), EQS(), GES(), GTS(), LES(), LTS(), NES(), NOTS(), ORS(), REUSE() |