Adding Outside Values to a Drop Down List
  • 16 Feb 2022
  • 2 Minutes to read
  • Dark
    Light

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 Project, click CREATE FLOW from the Global Action Bar.
  2. In the Create Flow window, select and name the default Flow, then click CREATE.
  3. In the Flow Designer, from the Toolbox > 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 Form window, under Create New click CREATE.
  7. In the resulting window, name the Form, then click CREATE.
  8. In the Form Designer, add a Button [Done], Label [Email Address], and a corresponding Drop Down List component from the Toolbox > FAVORITES section. 
  9.  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).
  10. Locate the List Input Source menu and select DataName. 
  11. Once the List Items DataName field appears, enter a name for the items in the drop-down list. 
  12. Enable the Allow external values to be selected boolean.
  13. Save and close the Form Designer.
  14. In the Flow Designer, select the Fetch Entities step and set Type Name under Entity Fetch Definition to Account
  15. Select the Show Form step and set the list of String Accounts to a Select From Flow input mapping and select the AllAccounts.All EmailAddress in the resulting window.
    The Entity Results outcome in this example has been renamed to AllAccounts for clarity.
  16. Set the Email Address input to Ignore.
  17. Next, add another Fetch Entities step configured with Account as the Type Name.
  18. Enable the Show Path For One Resulboolean.
  19. Locate the Fetch Criteria selector then click ADD. 
  20. In the Add Fetch Criteria window, select emailAddress from the Field Name menu. Click OK.
  21. Navigate to INPUTS > email Address and change the mapping to Select From Flow then select Email Address
  22. Next, add two Create Data steps to the workspace and connect one to the single Result path from the Fetch Entities step. 
  23. In the Properties panel of this Create Data step, locate DATA > Data to Create click SHOW EDITOR.
  24. In the Data to Create window, add SelectedAccount with an Account type. Click SAVE, then close.
  25. Next, change the input mapping on the Selected Account input to Select From Flow and select EntityResult.
  26. Then, connect the second Create Data step to the No Results path of the second Fetch Entities step.
  27. In the Properties panel > INPUTS > Selected Account, change the input mapping to Build Data.
  28. When the Properties option appears, click the pencil icon and locate and select EmailAddress. Click OK.
  29. Then, change the EmailAddress input mapping to Select From Flow and select the Email Address string.
  30. 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 START DEBUGGING.
  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?