Skip to main content
OCLC Support

Return values for client macro commands

Find return values for macro commands in Connexion client.

Many client macro commands are functions that return a value of TRUE (if the command executes successfully) or FALSE (if the command fails).

For these commands to work correctly, you must assign a variable to store the return values. As each command executes, the stored value is updated.

(Optional) You can include If . . Then . . Else statements or other code that checks the value of this variable and, based on the result, displays messages or branches to different sections of the macro. If...Then...Else executes alternative blocks of program code based on one or more expressions.

Syntax A
If condition Then then_statement [Else else_statement] [bracketed parameter is optional]

Syntax B
If condition Then
[Else expression Then statement_block]
[Else statement_block]
End If


  • condition is any expression that evaluates to TRUE (non-zero) or FALSE (zero)
  • then_statement is any valid single expression
  • else_statement is any valid single expression
  • expression is any expression that evaluates to TRUE (non-zero) or FALSE (zero)
  • statement_block is 0 or more valid expressions, separated by colons (:) or entered on separate lines

 Note: When multiple statements are required in either the Then or Else clauses, use the block version (Syntax B) of the If statement.

Use the following syntax to specify the variable BOOL to store the return value of each command: BOOL = CS.[command]

 Note: Standard OML commands to not use the CS. prefix. For example:

  • Set
  • If . . Then . . Else
  • MsgBox