Foreign Keys

To reference data from a different database table (1:n relation), you can use foreign keys. Foreign sets (m:n relation) are described at the bottom of the page.

Parameters:

  • ftable: foreign table
  • flabel: the attribute to show
  • fsave: the attribute to save
  • flabel2: another attribute to show
  • fconcat: the string to concat label and label2 with
  • frestr: restriction on the foreign table
Sample Code

Live Sample

Foreign Sets

Foreign Sets allow a reference with a m:n relation a a different database table.

Parameters

  • ftable: foreign table
  • flabel: the attribute to show
  • fsave: the attribute to save in the m:n-table
  • input: type for selection while editing
  • mtable: m:n-table
  • mforeign: attribute of m:n-table for foreign id
  • mthis: attribute of m:n-table for this id
  • frestr: restriction on the foreign table
  • allnone: add checkboxes to mark all or none values
Sample Code

Live Sample