Variable source
This example demonstrates how to set up dependencies between controls in a user step to affect the data output shown to the End-user.
The example is based on the source being a variable.
Ensure that Allow Dependencies is set to true for the user step. The user step must allow dependencies for this functionality to work properly.
Create an App with steps and input data
Create a new Application in an Application package and open it in the Designer.
Create a User step and bind it to the start step with a sequence arrow.
Create a Script step and add a data arrow to the user step.
Add the following script to the script step and set its target variable to categories.
Create and connect list controls
Check the Allow Dependencies checkbox in the user step general section.
Create a List selection control in the user step.
Set Source to be categories.
Set the Prompt to be Category.
Set the Large Row Text to be {name}.
Set the Target Variable to be category.
Create another List selection in the user step.
Set Source to be category.value.
Set the Prompt to be Item.
Set the Large Row Text to be {name}.
Set the Selection reload behaviour to be keep my local changes.
Test the user step with keep my local changes
Save the Application.
Start the Application in any client.
Open the category list selection and select Paper and pen.
Open the item list selection.
You can now see that you options are limited to only the pens and papers.
Red pen
Blue pen
Green pen
Paper (single)
Paper (multiple)
Select the Red pen
Open the category list selection and select Pens.
Open the item list selection.
You can now see that the Red pen is still selected since it is still a valid option to select and the control has been set to Keep my local changes.
You can see that your options are limited to only pens.
Red pen
Green pen
Blue pen
Open the category list selection and select Storage.
Open the item list selection.
You can now see that the Red pen is no longer selected since it is no longer a valid option.
You can see that your options are limited to only boxes.
Big box
Small box
Test the user step with discard my local changes
Open the Application in the Designer.
Open the User step with the List controls.
Open the item list selection.
Set the Selection reload behaviour to be discard my local changes.
Repeat step 1 - 5 in from the previous example of Test Reload Strategy Keep Changes.
Open the item list selection
You can now see that the Red pen is not selected anymore after the change of the category due the control being set to Discard my local changes.
You can see that your options are limited to only pens.
Red pen
Green pen
Blue pen
Last updated