Skip to main content

Try Set Var

Category: Control Try Set Var block screenshot

Guards only evaluation of `value`; it does not catch later statements or create a transaction. On failure it stores `fallback` or null, optionally stores false plus the error message, and continues. Use it for row-local parsing and optional reads, not to suppress fatal setup, permission, or mutation failures.

Inputs

InputRequiredValue KindTypesEnum Values
nameyesstring
valueyesexpression
fallbacknoexpression
storeSucceededInnovariable-name
storeErrorInnovariable-name

Notes

  • Evaluates value and stores it in name. If that expression throws, the statement stores fallback (or null when omitted) and continues.
  • Optional storeSucceededIn receives a Boolean and storeErrorIn receives the error message or an empty string after success. All named outputs must be distinct.
  • Only expression evaluation is guarded. An invalid fallback still fails, and the block does not catch later statements or turn a multi-step mutation into a transaction.
  • Use this for genuinely row-local parsing or optional reads in best-effort workflows. Do not use it to hide fatal setup, permission, or mutation failures that should stop the run.