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

Adding Outside Values to a Dropdown List

  • Dark
    Light

Article Summary

Overview

Only certain data types support outside values
The option to add outside values is only supported for String lists. It is not available for complex Entity data types such as Data Structures, FileData, or any etc data type comprised of multiple variables.

Dropdown Lists may accept external values not originally offered in its list.

Users may enter their own unique option that will be saved into the list to be available for selection in later Form runtimes.

An example may include a list of inventory items for purchase that the assigned user may add other items. Another may include displaying a list of accounts and adding another.


Example

External Values not supported in Mobile Forms
Browser Forms only support this feature.
  1. In a Designer Project, create a Flow. It will automatically open in the Flow Designer.
  2. In the Flow Designer, add Fetch Entities step from the Toolbox to the Start step. 
  3. For the Fetch Entities, change the Type Name to Account and set Sort Field to emailAddress. Rename the output to 'AllAccounts' for better clarity.
  4. Next, connect the Results outcome of the Fetch Entities step to a Show Form step.

  5. Select the Show Form step and create a new Form. It will automatically open in the Form Designer.
  6. In the Form Designer, add a Button named 'Done' and a Drop Down List control from the Toolbox > FAVORITES section. Upon dragging it into the workspace, name it 'Email Address' and confirm with ENTER+SHIFT.
  7. With the Drop Down List control selected, navigate to the Properties panel > INPUT DATA > Type menu and change the type to String [Text]. Locate the List Input Source menu and select DataName.

    Once the List Items DataName field appears, enter a name for the items in the drop-down list such as 'Accounts'. Enable the Allow external values to be selected Boolean.
  8. Save and close the Form Designer to return to the Flow Designer.
  9. Select the Show Form step, and set the Accounts input to a Select From Flow input mapping then choose the AllAccounts.All EmailAddress in the resulting window.

    Set the Email Address input to Ignore since input is for a user-entered email address.
  10. Next, add another Fetch Entities step configured with Account as the Type Name. Enable the Show Path For One Resulboolean. Locate the Fetch Criteria selector then click ADD.

    In the Add Fetch Criteria window, select emailAddress from the Field Name menu. Click OK.
  11. Navigate to INPUTS > email Address and change the mapping to Select From Flow then select Email Address
  12. Connect the single Result path to the end step. For the No Results path, add a Create Data step.
  13. In the Properties panel of this Create Data step, locate DATA > Data to Create click SHOW EDITORAdd data named SelectedAccount with an Account type. Click SAVE, then close.
  14. Change the input mapping on the Selected Account input to Build Data. Change the EmailAddress input mapping to Select From Flow and select the user-inputted Email Address string.

    Click the pencil icon and locate and select EmailAddress. Click OK to confirm selection.
  15. After the Create Data step, connect it to the end step.

Debug

  1. Click Debug in the top bar; this will automatically save the Flow. In the Debugger, click START DEBUGGING.
  2. Select an existing email address and observe the Flow run successfully. 
  3. 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?