Link

Geschätzte Lektüre: 4 Minuten

The following examples show how to apply the advanced filter for Links.

When creating a link to an existing data record from another table, all data records from the other table are listed as options. With advanced filters, the quantity of the listed data records can be reduced. Only data records which meet the set conditions of the advanced filter will be listed for selection.

In the following examples a data record of the ‘PATIENTS’ table should be linked to a data record of the ‘DISHES’ table:

Advanced Filter through setting the variables, corresponding to the SQL clause “$where []” and “$from []”

Available filters:

  • $select
  • $from
  • $where
  • $join
  • $order

Advanced Filter through filter settings using the “$gsr” parameter (see functional description “get_gresult”)

In this example, the following variables have to be replaced with appropriate values.

  • $tableIdGerichte: ID of the’Dishes’ table
  • $tableIDPatienten: ID of the ‘Patient’ table
  • $fieldIdAnzahlZutaten: Field ID of the ‘Number of ingredients’ field in the ‘Dishes’ table
  • $fieldIdName: Field ID of the ‘Dish name‘ field from the ‘Dishes’ table
  • $fieldIdBeschreibung: Field ID of the ‘Description’ field in the ‘Dishes’ table
  • $fieldIdEinschraenkung: Field ID of the ‘Restriction’ field in the ‘Patients’ table
  • $laufendeFilterNr: Index (freely selectable) , with multiple filters starting from 0 and ascending.

When creating the link, only data records of the ‘Dishes’ table are suggested / listed, where

  • the number of ingredients is 10 or more
  • the characters ‘Soup’ or ‘Stew’ are found in the name
  • the characters from the ‘Restriction’ field of the ‘Patients’ table are in the description field

Advanced filter by using your own function

return myExt_FilterExample($gtabid,$utyp,$filter,$gsr,$verkn,$onlyfield,$null,$extension);
Share this Doc

Link

Or copy link

CONTENTS