Introduction
A cascading drop down is a series of drop downs whose populated values depend on what the user entered in the previous drop down. This keeps users from having to deal with unusably large lists of values (like every state/province in the world, rather than just the ones that apply to a given country).
It also gives the developer a way to keep values out that don't apply. For example, a cascading drop down on a banking screen might first list broad loan categories (home, auto, personal) and then list applicable, specific categories. If the user selects "home", the next drop down could contain term values of "30 years", "15 years", etc. Using a cascading drop down for these values ensures the user can't enter data that makes no sense, like "auto" loan type and then "30 years" term.
Prerequisites
- The form you need to edit must already exist.
- The picklists you are using must already be configured with the values of the list members you want in the framework table. You can edit the framework code table via the application’s Code menu or also from Xelence itself, from the Tools menu.
|
Quick Steps |
| 1 |
Add the desired entity attributes |
| 2 |
Change the control type, then click OK |
| 3 |
Edit the parent drop down properties |
| 4 |
Edit the child drop down properties, then click OK |
| 5 |
Move the controls |
| 6 |
Save the form |
Detailed Steps
Step 1. Add the desired entity attributes.
The entity attributes can be added from the Entity tab on the right panel.
This example uses the attributes for "country" and "state".
Drag and drop or double click the desired entity attribute to the Criteria section.
Step 2. Change the control type, then click OK
Xelence adds the attribute as a default control type based on the attribute properties. If you want to use a different control type, you'll have to change the type.
In this case, you are changing the control type to cascading drop down.
To change the control type, right click it and select Change Control. You can also change the control by clicking the Change Control icon above the control.
Step 3. Edit the parent drop down properties.
The important properties are:
- Search Field: Column whose value is linked to the control.
- Query Operator: SQL operator used in the appended where clause. For a cascading drop down, this is usually "=".
- Caption: Text that the user sees.
- PickList Field: Framework table ID that contains the value records that populate the list.
It is also possible to configure a cascading drop down with a query or method. Picklist is the most common way.
To enter the Picklist, open the Data Source section and click the dots icon.
Step 4. Edit the child drop down properties, then click OK
The important properties are:
- Search Field: Column whose value is linked to the control.
- Query Operator: SQL operator used in the appended where clause. For a cascading drop down, this is usually "=".
- Caption: Text that the user sees.
- Parent Control: ID of the parent drop down.
- PickList Field: Framework table ID that contains the value records that populate the list.
- Parameters: ID of the parent drop down plus configured caption(s) from the framework table. This maps the values in the drop downs to each other.
It is also possible to configure a cascading drop down with a query or method. Picklist is the most common way.
For the child drop down, after entering the Picklist, click the magnifying glass icon to open and enter the parameters.
Enter the control that contains the data of the Parameter Field you're using in this ID's value records. This data is set in the Codes table, which you can access via the application.
Step 5. Move the controls, if necessary.
Generally, put the parent control to the left or above a child control. This will be easier for your users to understand. The parent in this example is Country, so it will be moved before State.
Step 6. Save the form.
Then, run the Preview. Xelence displays the form output. You can test your updated settings.
When you have previewed your form, it should look something like this. Before you select the parent drop down, the child cannot populate.
With the parent entered, the child can populate if the selected record has child records in the Codes table.
What are the improvements over S3 Version 6?
The process is nearly identical. In Xelence, if the Picklist IDs are already set in the entity, you don’t have to set it in the forms again unless you want to assign a different Picklist ID at the form level.
Related Articles
Add a MultiSelect Drop Down
This post is part of the Lookup Form topic. Click here to open the Lookup Form Overview.
This post is also part of Controls and Buttons topic. Click here to open Forms Toolbox Controls
#Xelence
#Forms
#ControlsandButtons