Skip to main content

when-unavailable

Syntax

- when-unavailable: expression

Description

The when-unavailable operation is the only operation that can process the special UNAVAILABLE value without the result of the variable automatically becoming unavailable. Using this operation will let you detect this state and convert it to another value for further processing.

When the incoming value is equal to UNAVAILABLE, the provided expression is evaluated and the result of that expression is passed to the next operation. When the incoming value is not UNAVAILABLE, it is passed along directly.

Examples

  var1:
- source: program-name
- when-unavailable: false
info

In the above example, program-name is an identifier from another part of the adapter script.