9 miscellaneous functions, 1 case, Case – Metrohm viva 1.1 (ProLab) User Manual

Page 86

Advertising
background image

2.3 Formula editor

■■■■■■■■■■■■■■■■■■■■■■

74

■■■■■■■■

viva 1.1 (for process analysis)

2.3.4.9

Miscellaneous functions

2.3.4.9.1

Case

Dialog window: Formula editor

Operators/Functions

Syntax
y = Case(Condition; value_true; value_false)

y = Case(Condition; value_true; value_false; value_error)

Returns value_true if the condition is true. Otherwise value_false is
given. If an error occurs in the condition (result invalid), value_error is
given.

Parameters
Condition

  Number

Any variable (Number type) can be entered here, or a relational or logic
operation can be performed whose operators can be transferred either
directly or as a variable. These can be of the Text, Number or Date/
Time
type.

Value_true

If condition <> 0, this parameter is saved as a result of the function. This
parameter can be transferred either directly or as a variable and can be of
the Text, Number or Date/Time type. Entire operations can also be
transferred here.

Value_false

If condition = 0, this parameter is saved as a result of the function. This
parameter can be transferred either directly or as a variable and can be of
the Text, Number or Date/Time type. Entire operations can also be
transferred here.

Value_error

If condition = invalid, this parameter is saved as a result of the function.
This parameter can be transferred either directly or as a variable and can
be of the Text, Number or Date/Time type. Entire operations can also
be transferred here.

Examples
Case('SD.ID1' = "";"ID1 empty";"ID1 not empty") = if no entry has
been made for ID1 in the run window, the text ID1 empty, otherwise
ID1 not empty, will be saved in the result.

Case('RS.IntermediateRes' > 5.5;"Intermediate result too
high";'RS.IntermediateRes' * 26.5;"Error occurred")
= If the result
"IntermediateRes" is greater than 5.5, then the text "Intermediate
result too high
" will be written into the result, otherwise the intermedi-

Advertising