Up to version 4.0 the dependent selection lists had to be created by directly editing the application.xml. In version 4.5 it is now possible to create them in the application designer.
In this workshop we would like to show you how to build and use dependent selection lists quickly and easily.


It occurs quite often that two or more selection lists depending on each other are required on an edit page. So the second selection list should only contain a certain part of all available entries when you made your choice in the first selection list. That improves the usability and reduces incorrect input.

Use case: If the user adds a new address the county and the city should also be entered.
To avoid incorrect input you offer two selection lists. Of course you can offer two selection lists independent from each other. But you can reduce the amount of cities as soon as the user selected a county. So in this case it would be handy to reduce the available cities to the cities located in the selected county.

Please open the application designer:
Now add two data groups – the data group counties and the data group cities. The data group cities has to be one level below the data group counties. In this case Intrexx automatically generates a 1:n (parent-child) relationship between the counties and the cities. On the edit page please add two selection lists for the county and the city. Then go to the properties dialogue of the city selection list and switch to the dependencies tab and add a new dependency. In the upper field of the dialogue please add the triggering control element. In our example it’s the selection of the county the triggering event. Since we would like to update the city selection list as soon as the choice in the county selection list has been made the event has to be “onchange”.

Now we need a filter so that the cities in the selection list will be filtered. The data group counties and cities are connected by the foreign key in the cities data group. The foreign key (FKLID) contains the id of the county in which the city is located in. Because we only want to display cities in a certain county the foreign key of the cities data group (FKLID) has to be compared to the primary key of the selected county (LID). (Control County – actual value /primary key).

The counties and cities will be displayed independently after loading the input page. That means that all cities will be displayed if the user hasn’t selected a county yet. There are two ways to avoid this situation:
  1. Select „first entry on list is empty“ in the county selection list and „Initially show selection list without entries“ in the city selection list
  2. Add another control to the events (city selection list). There choose the edit page with the event “onload”. In this case the city selection list will already be filtered at the onload event of the page.
United Planet
Intrexx Application Store Press Downloads
English