Add dependent options to an action card
This is an Early Access feature for existing Workflows users. To enable it, use the Early Access Feature Manager as described in Manage Early Access and Beta features.
Options of the type Helper Flow can be dependent on other options that are defined in the Options dialog.
For example, assume you are creating a card with two options fields, both of which are dropdowns, and they are named Project and Issue Type. The Issue Type dropdown will be populated with values only after the user selects a project from the Project dropdown. Because the Issue Type helper flow requires a selection in the Project field by the card user, the Issue Type option is “dependent” on the Project option. The Jira connector Create Issue action card contains the same design.
For the Project dropdown, add a helper flow and name it
Get Available Projects. This helper flow makes a request to the service to return a list of projects that are available to the user of the card. To build the child flow and format the response, see Add option fields to connector cards.
To display the values in the Issue Type dropdown, you first need to determine which value was selected from the Project dropdown by the user. Create a second helper flow and name it
Get Issues Type by Project ID, and include an input field named Project ID.
This helper flow makes a request to the service to return a list of issue types available based on the project selected by the card user. When the Issue Type option is created, and the Get Issue Types by Project ID flow is selected, the dialog will detect the Project ID input defined on the helper flow card and allow the input to be mapped to the value that was retrieved from the Project option.
When the card is deployed, the second flow will wait until the user makes a selection before it runs.