If present

Run actions only when an optional column holds a value, with that column required inside them; optionally other actions when it is absent

Ingredient Family: rowActionsIngredients

Outline Display: Only when {{column}} is present, perform: {{innerAction}}
Otherwise, perform: {{elseAction}}

Details

The inner steps see the column as required: a formula or mapping there may use it where a value is needed, with no COALESCE. When the value is absent, elseAction runs instead – or nothing, when it is unset – with the column still optional. This is how a pipeline hands an optional file, key or id to a step that needs it present. To refuse rather than skip, put a Require on ISPRESENT([Column]) before that step instead. Columns both branches add are visible to later steps; a column only one branch adds is not, exactly as for If condition, and two branches that add the same name at different types fail the check. The narrowed column itself goes back to being optional after the step: only the steps inside innerAction know it is present.

Local scope

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

  • $table – The table to act on

Names introduced within this component’s knobs:

  • $table/present – empty table populated by ingredients
  • $table/absent – empty table populated by ingredients

Settings

Required

  • column : column of $table (type filter: any type (must be optional))
    The optional column whose presence chooses the branch

Optional

  • innerAction : ingredient slot of rowActionsIngredients($table/present) (many)
    The action(s) to perform when the column holds a value; they see it as required

  • elseAction : ingredient slot of rowActionsIngredients($table/absent) (many)
    The action(s) to perform when the column is absent; omit this to do nothing in that case