Adding Outside Values to a Drop Down List
  • 16 Feb 2022
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Adding Outside Values to a Drop Down List

  • Dark
    Light

Article summary

Overview

In some instances, new/external string values may need to be added to a drop-down list. In a Form, drop-down list options can be created from several sources; these sources include populated data from workflows, specifying a static list directly in the Form Designer, or running a workflow to populate a list of choices. The following example will demonstrate how to add string values to a drop-down list.

Example

External Values not supported in Mobile Forms
Browser Forms only support this feature. 
  1. Begin by navigating to a Designer Folder, click CREATE FLOW from the bottom action panel. 
  2. In the Create Flow window, select and name the default Flow, then click CREATE.
  3. In the Flow Designer, from the Steps > Favorite Steps section, drag and connect a Fetch Entities step to the Start step. 
  4. Next, connect the Results outcome of the Fetch Entities step to a Show Form step.
  5.  In the Properties panel of the Show Form step, select Pick or Create Form.
  6.  In the Create or Pick window, under Create New name the new Form then click CREATE.
  7. In the Form Designer, add a Button [Done], Label [Email Address], and a corresponding Drop Down List component from the Form Controls > Favorite Components section. 
  8.  With the Drop Down List component selected, navigate to the Properties panel > Input Data > Type menu and change the type to String [Text].
    The option to add external values is only supported for String lists, not complex types (e.g. data structures).
  9. Locate the List Input Source menu and select DataName. 
  10. Once the List Items DataName field appears, enter a name for the items in the drop-down list. 
  11. Enable the Allow external values to be selected boolean.
  12. Save and close the Form Designer.
  13. In the Flow Designer, select the Fetch Entities step and set Type Name under Entity Fetch Definition to Account
  14. Select the Show Form step and set the list of String Accounts to a Select From Flow input mapping and select the AllAccounts.AllEmailAddress in the resulting window.
    The Entity Results outcome in this example has been renamed to AllAccounts for clarity.
  15. Set the Email Address input to Ignore.
  16. Next, add another Fetch Entities step configured with Account as the Type Name.
  17. Enable the Show Path For One Resulboolean.
  18. Locate the Fetch Criteria selector then click Add New
  19. In the Add Fetch Criteria window, select emailAddress from the Field Name menu. Click OK.
  20. Navigate to Inputs > email Address and change the mapping to Select From Flow then select Email Address
  21. Next, add two Create Data steps to the workspace and connect one to the single Result path from the Fetch Entities step. 
  22. In the Properties panel of this Create Data step, locate Data > Data to Create click Show Editor.
  23. In the Data Definitions window, add SelectedAccount with an Account type. Click CLOSE.
  24. Next, change the input mapping on the Selected Account input to Select From Flow and select EntityResult.
  25. Then, connect the second Create Data step to the No Results path of the second Fetch Entities step.
  26. In the Properties panel > Inputs > Selected Account, change the input mapping to Build Data.
  27. When the Properties option appears, click the [...] and locate and select EmailAddress. Click OK.
  28. Then, change the EmailAddress input mapping to Select From Flow and select the Email Address string.
  29. Then, connect the Create Data outcomes to the End step.

Debug

  1. Click Debug in the top bar; this will automatically save the Flow.
  2. In the Debugger, click FULL.
  3. Select an existing email address and observe the Flow run successfully. 
  4. Create a new session and attempt to add a new drop-down list value and after the Flow completes, click View Inputs and Outputs on the Create Data step and notice the new input information.

Was this article helpful?