Case branch

One branch of a Case: the value that selects it, and the actions to run

Ingredient Family: caseBranchIngredients

Outline Display: When it is {{key}}: {{steps}}

Details

key is the exact string the dispatching column has to hold for this branch to run; the comparison is literal, so casing and spacing matter. Two branches with the same key are not an error – the first one wins – but the second is dead code, so the check reports a key the parameter does not allow and a value with no branch at all. The steps see the row the Case was given, and whatever they add is visible to the later steps of this branch alone. Only the columns every branch of the Case adds survive past the Case itself.

Local scope

The parent slot binds these (look up the slot in the parent to see how):

  • $table – The table whose row the branches act on

Names introduced within this component’s knobs:

  • $table/branch – empty table populated by ingredients

Settings

Required

  • key : constant value (type: text; required, non-nullable)
    The value of the dispatching column that selects this branch, e.g. “archive”

Optional

  • steps : ingredient slot of rowActionsIngredients($table/branch) (many)
    The action(s) to perform when the column holds this value