If/else subform

IngredientformIngredients

A choice of two sub-forms given a condition

Ingredient Family: formIngredients

Outline Display: A conditional subform that depends on {{which}}. When True, the subform is: {{subFormT}}When False, it’s: {{subFormF}}

Local scope

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

  • $parentTable – The table (if any) that this form is based on
  • $formFieldsTable – A table of form fields that is built up through the sequence of form ingredients

Settings

Required

  • which : formula (returns bool; required, non-nullable)
    A boolean formula using previous fields that determines whether the sub-form is visible
    Scope: all columns of $formFieldsTable (reference as [ColumnName], e.g., [Name], [Price])

Optional

  • subFormT : ingredient slot of formIngredients($parentTable, $formFieldsTable) (many)
    The sub-form to show when the condition is True

  • subFormF : ingredient slot of formIngredients($parentTable, $formFieldsTable) (many)
    The sub-form to show when the condition is False