- 16 Jun 2021
- 2 Minutes to read
- Print
- DarkLight
Handling Large Drop Down Lists
- Updated on 16 Jun 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
The Decisions Form designer offers a multitude of tools that can be used to collect information via user input from a Form. One such method is the selection of data from a drop-down component; these data options can be static values or dynamically populated via a Flow. The following article will explain how a Flow can be used to dynamically populate a drop-down component with a large list utilizing user-typed Strings of text.
Example
Navigate to any Designer Folder and select CREATE FORM from the bottom action panel.
In the resulting Create Form dialog box, select and name the Normal Form.
Select CREATE to open the Form Designer.
In the Form Designer, in the Form Controls tab located on the right side, select and drag Drop Down List from the Favorite Components section.
Drag and label a Button from the Favorite Components section, place it under the Drop Down List component.
Next, with the Drop Down List component selected, locate the Properties > Input Data > Type drop down component select All/Search and search for "Account". Select the first option.
- Select EmailAddress from Input Data > Display Field.
Select Flow from Input Data > List Input Source.
Next, click Create under the Input Data > Flow ID field.
In the resulting Create New Flow window, name the new Flow and click CREATE to enter the Flow Designer.
In the Flow Designer, select the Start step to navigate to its Properties tab.
Under Flow Data > Flow Input Data, select Show Editor.
From the Flow Inputs window, configure one String [Text] type with the Name "Text" then click CLOSE.
From the Steps panel, drag and connect a Length Greater Than step to the Start step.
Select the Length Greater Than step and use a Constant mapping of three under Inputs > Length.
Using the Select From Flow mapping on Inputs > Value1, choose the String [Text] from the Start step.
From Steps > Favorite Steps section, pull and attach a Fetch Entities step to the 'True' path from the previous step.
Attach the False outcome to the End step.
With the Fetch Entities step selected, in the Properties panel, under Entity Fetch Definition > Type Name select Account from the All/Search result.
Under Entity Fetch Definition > Fetch Criteria select Add New.
Under Add Fetch Criteria > [Settings] > Field Name select emailAddress.
Under Add Fetch Criteria > Query Match Type select Contains. Then click OK.
Using a Select From Flow mapping under Inputs > Email Address, select String [Text].
Connect the Results and No Results outcomes to the End step.
With the End step selected, navigate to the Properties panel > Pick From Current Data section and enable the EntityResults checkbox.
Save and Close Flow Designer.
Save and Close Form Designer.
Select CREATE FLOW from the bottom action panel.
Choose and name Default Flow. Click CREATE.
From the Steps > Favorite Steps category, drag and attach a Show Form step to the Start Step.
In the Properties panel click Pick or Create Form. Choose PICK.
In the Create or Pick window, select the Form created in this tutorial. Click PICK.
Under Inputs > selected, select the Ignore mapping.
Connect the Form Done step to the Flow End step.
- Save the Flow.
Debug
In the Flow Designer, select Debug in the top action panel. In the Debugger, click FULL.
The Form will display, begin typing letters that correspond to an option in the list; these options will populate under the drop-down component based on the number of letters entered.
Select Done to close the Form.