My FNZ Studio Version

Screen-Driven Model

Latest Update: 04.01.2021 |
Recipe
2024
2023
2022.2
2022.1
11
10
9
8
7

Problem

As a Screen Developer, I need to implement a page where the content of a dropdown list depends on the selection of another dropdown list. How do I implement this in Appway?

Solution

The Dropdown List Screen Component and its Data Source capabilities provide all the necessary functionalities to implement a cascading selection of items.

In the example below, the 'Country' Dropdown List depends on the 'Continent' Dropdown List, so that the available countries are pre-filtered based on the selection of the continent.

DDLCascade1.png

To create this implementation, follow these steps:

  1. Create a Catalog Business Object containing the list of continents that will be linked to the 'main' dropdown list (see step 3). The Catalog can be named, e.g ' Continents'.
    DDLCascade2.png

  2. Create another Catalog containing a list of each continent's countries to be linked to the 'dependent' dropdown list (see step 3). The Catalog can be named, e.g. 'Countries'. In this Catalog, you must:

    • Assign a variable (Variable tab) of type String such as $continentFilter. This is used as a filter variable in the Expression filter (see third bullet point below).
    • Add a column containing the continent IDs. The IDs must match the ones contained in the 'Continent' Catalog (see image below).
    • Set the Expression filter (Properties tab), which allows you to manipulate records. In this case, set the following Expression (see image below):
      Record $record;
      Return FILTER($records, $continentFilter == TOSTRING($record.getValue('continent_id')), $record)
      

      DDLCascade3.png

  3. Create a Screen containing the Dropdown Lists corresponding to the already-created Catalog Data Sources:

    • Define the $selectedContinent variable of type String and scope Local.
    • Create the 'Continent' and a 'Country' Dropdown Lists and link them to the 'Continent' and 'Country' Catalogs, respectively, from the Data Source tab.
    • For the 'Country' Dropdown List, set the $selectedContinent Expression for the $continentFilter Variable Name from the Variable Assignment tab.
    • Bind the 'Continent' Dropdown List to the $selectedContinent variable.

    DDLCascade4.png

  4. Add an Ajax Update Action to the relevant dropdown list.
    The main dropdown list, in this case the 'Continent' Dropdown List, is linked to an Ajax update Area Action triggered by an onchange Event, so that it is refreshed when the item selection changes.
    DDLCascade5.png

  5. Insert the Screen into a Process and run it.

Using a Radiobutton List Screen Component instead of a Dropdown List

For lists with a limited number of options, you can easily switch from a Dropdown List to a Radiobutton List Screen Component from the Screen Editor. The Radiobutton List works with the same binding, Data Source and Actions as the Dropdown List.

DDLCascade6.png

© 2026 Appway AG. All Rights Reserved