From formula

Set a column value using a formula

Ingredient Family: mappingIngredientsList

Outline Display: Set output {{columnName}} to the result of formula {{formula}}

Details

ty names the type of the column being set, and is needed only for a column the mapping’s match table does not already have – which is every column of an outputMapping, since those match against no table. It may be left out there when the formula is a bare [Column] reference: such a formula hands that column over unchanged, so the output takes its type exactly, optionality and all. Anything else – a computed formula, or a reference to a list column, which only From list column can hand through – has to declare ty. A declared ty always wins over the referenced column’s own type, which is how a value is deliberately reported at another type.

Local scope

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

  • $inputsTable – The input table
  • $mappingResult – A table that contains all mapped columns so far
  • $matchTable – An optional table that contains columns that we may be trying to set values for

Settings

Required

  • columnName : column of $matchTable or new (type filter: any type)
    The field we want to set
    Set ty only when columnName names a new column (not in $matchTable).

  • formula : formula (returns type chosen and saved as ty)
    the formula that assigns the value of the output field
    Scope: current time as [CURRENTTIMESTAMP], all columns of $inputsTable (reference as [ColumnName], e.g., [Name], [Price])