Description

The cascading select allows you to display select values which are categorised by the parent value. With the Custom Field Option Synchroniser you can retrieve both the parent and child values from your custom database tables.

Example

This is an simple example which shows how to use the Custom Field Option Synchroniser in combination of the cascading select.

Both tables in this example contain the only necessary columns which are required for the cascading select.

Parent table

Definition

CREATE TABLE `my_foo_parent` (
  `id` int(11) NOT NULL,
  `value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin

Data

Child table

Definition

CREATE TABLE `my_foo_child` (
  `id` int(11) NOT NULL,
  `parentid` int(11) NOT NULL,
  `value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin

Parentid can be a column directly on the child table or the value can later be retrieved with joins though it normally should be a 1 to m relationship where the foreign key is in the child table. There is no need though to actually define a foreign key.

If there is no connection in the database on the table you need to define a mapping table for the parent-child relationship and join the mapping table in the child query.

Data

Custom field sync configuration

Custom field

Definition

After a sync the custom field which you defined in the sync configuration is populated with the following values.

Ticket view

Each parent has as options only the childen as child values.


Comments  (1)

1 Comment

  1. Oliver Sträßer - Kann diese Seite freigegeben werden?

Attachments  (7)

Add Attachment
  File Modified
PNG File Screen Shot 2016-12-07 at 10.21.42.png 07. Dec. 2016 by Sascha Häusler
PNG File Screen Shot 2016-12-07 at 10.21.20.png 07. Dec. 2016 by Sascha Häusler
PNG File Screen Shot 2016-12-07 at 10.28.23.png 07. Dec. 2016 by Sascha Häusler
PNG File Screen Shot 2016-12-07 at 10.28.08.png 07. Dec. 2016 by Sascha Häusler
PNG File Screen Shot 2016-12-07 at 10.30.44.png 07. Dec. 2016 by Sascha Häusler
PNG File Screen Shot 2016-12-07 at 10.30.35.png 07. Dec. 2016 by Sascha Häusler
PNG File Screen Shot 2016-12-07 at 10.30.26.png 07. Dec. 2016 by Sascha Häusler