Fuzzy lookup by foreign key

IngredientportIngredients

copy one column where the source and destination are both foreign-key references, doing a lookup in the table the destination foreign key references to determine options

Ingredient Family: portIngredients

Outline Display: Source column? {{sourceColumn}}
Destination column? {{destinationColumn}}
Table referenced by the destination column as a foreign key? {{foreign}}
GUI text label to go with that destination column? {{label}}
Limit on how many fuzzy matches to show? {{top_n}}

Local scope

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

  • $sourceTable – The source table
  • $destinationTable – The destination table

Names introduced within this component’s knobs:

  • foreign – table chosen from the app’s schema (via foreign knob)

Settings

Required

  • sourceColumn : column of $sourceTable (type filter: any type (must be required))
    source column

  • destinationColumn : column of $destinationTable (type filter: any type (must be required))
    destination column

  • foreign : table
    The table referenced by the foreign-key column in the destination table

  • label : constant value (type: text; required, non-nullable)
    destination column label

Optional

  • howManyFuzzies : constant value (type: integer; required, non-nullable)
    limit on how many fuzzy matches to suggest