Creating Drop Down List Options from Flow Output

Last Updated: 10/03/2018 Introduced in Version: 2.0

Overview:

In a form, drop down list options can be created from a number of sources – including flows. To create drop down options from a flow, first create a flow that is configured to output the required information for the drop down options. Then, in the Form Designer, create a form with a Drop Down List component that uses the flow as a List Input Source. Finally, create a flow that displays the form with the drop down list.

Example:

The example flow will display a form containing a drop down list and a button. In the drop down list, users will be able to select from a list of all of the folders in our system. This drop down list will be populated by a flow. Another flow will be created to display the form.

Steps:
  • GetAll: Integrations > All Integrations > Internal Services > FolderService
  • [Form Name]: Flows, Rules, Forms and Reports > Forms[Interaction] > [Current Folder]
 
Below is the image of the completed form with a drop down list displaying the data from the GetAll step.
 
 
Configure The Steps:

Begin the example by creating the flow which will retrieve a list of system folders. In the project folder, select the CREATE FLOW button.

In the resulting Create Flow dialog, name the flow and select CREATE to open it in the Flow Designer.

Begin designing the flow by placing the component that will get a list of all folders in the system. From the Flow Designer Quick Add Step dialog, under Integrations > All Integrations > Internal Services > FolderService category, select a Get All component, then Add to add it to the work space.
 
 
 

Next, connect the step outcomes.

To be useful as a source of input for the drop down list options, the flow must be configured to output the folder names it retrieved in Get All.

To do this, select the End Step. In the Properties panel, in the Output section, select the Add New link.

2016-12-12_093523

 

Name the output Folders. Under Type search and choose Folder.

The flow is expected to output a list of folder objects, not just one, check the Is List checkbox and select CLOSE to save the output definition.

Next map where the End Step gets the Output Information from.
In the Inputs section, change the Mapping Type to Select Value [From Flow].  Select Pick and select the Get All_Output option.
 
This completes the first flow, click the Save Flow link at the top of the screen to save it, then close the Flow Designer.

 

Next, create the form which will display the drop down list of folder names. Begin in the project folder by selecting the Create Form button at the bottom of the window.

In the resulting Create Form dialog, name the form and select CREATE to open it in the Form Designer

In the Form Designer search for the Drop Down List component in the Form Controls panel, then drag it to the work space. Next, place a button on the form by dragging the Button component from the Form Controls panel to the work space.

With the Drop Down List selected. In the Properties > Input Data section, under the Type selector. Search for and select Folder in the resulting Pick Entity dialog.

Each folder object possesses several properties – any one of which might be suitable to display in our drop down list. To specify the folder name, in the Properties panel, in the Input Data section, select EntityName in the Display Field drop down list. Change the List Input Source to Flow which will allow the drop down list to call a flow. 

Identify the flow choosing the selector within the Flow ID and connecting to the flow where the Get All step is located. 

To be useful in subsequent steps, the drop down list control must know what to call the item that is selected when the form is submitted. Define this as “Data” in the field Selected Item Data Name
 
Then Selecting the Button be a Required Outcome Scenario in the Properties panel while the Drop Down is selected.
 
This completes the form, select the Close link in the Form Designer menu at the top of the window to save and close. 

Next, create the second and final flow. Back in the project folder, select the Create Flow button.

In the resulting Create Flow dialog, name the new flow and select CREATE to open it in the Flow Designer.

Begin building the flow by selecting the form that was just created. It can be found in the Quick Add Step dialog, under the category Flows, Rules, Forms and Reports > Forms[Interaction] > [Current Folder]. Select Add to add it to the work space. Set the Input Path to Ignore.
 
 
 

Next, connect the steps’ outcomes.

Save the flow by clicking the Save Flow link at the top of the Flow Designer.

The flow is now ready to test. Back in the project folder, select the Drop Down Flow and then Run Flow from its Action menu. 

The form is presented. When letters are entered in the drop down list, the folder names containing that pattern automatically appear in a list beneath our control. Alternately, select the arrow on the right side of the drop down list to show all of the available folders.

 
 

Additional Resources