Dynamic Picklists are multiple-choice questions that get their list of choices directly from Salesforce. Values are populated from Salesforce when the form loads, so the choices in your picklist always stay current without having to refresh the schema.
You can configure your Dynamic Picklists to get their list of choices from:
a list of Salesforce object lookup results
a Salesforce picklist (a type of field)
To use Dynamic Picklists, you will need:
- Permission to use the Dynamic Picklist feature (controlled by your FormAssembly administrator)
- An Enterprise or Cloud Compliance plan
- Access to a Salesforce instance.
Setup Dynamic Picklists
There are two parts to setting up a Dynamic Picklist:
In Form Builder 5.0, set the source of your multiple-choice question to Salesforce (Step 1).
In the Salesforce Prefill Connector, configure the Dynamic Picklist settings to pull the appropriate data directly from Salesforce (Steps 2-6).
Part I: Set Source of Choices
Step 1A: Set source for a new question
Begin with adding a new multiple-choice question (Drop-Down Menu, Radio Buttons, Checkboxes, or a Multi-Select List) to your form. Give the field an appropriate name and click the Choices button in the editing toolbar, which will open the Setup Choices modal.
Please Note: A dynamic picklist can be created with any multiple choice question type, but once the dynamic picklist has been configured, it will always display as a dropdown box.
On this modal, you will see 3 options: Manual Input, Datasets, and Salesforce.
Clicking the Salesforce tile will set the source of that question’s choices to Salesforce and open the Edit Choices modal.
Step 1B: Change source for existing question
Start by selecting the question you would like to update, then click the Choices button in the editing toolbar to open the Edit Choices modal. The title of the modal will be appended with the current source of choices for the question you have selected.
To change the source of choices, click the dropdown button next to the current source and then select Salesforce from the dropdown menu. At that point, you will see the modal reflect information about Dynamic Picklists.
Part 2: Configure your Dynamic Picklist
Step 2: Access the Salesforce Prefill Connector
Dynamic Picklist can only be configured in the Salesforce Prefill Connector. You can access your connectors by clicking the plug icon in the left side navigation directly from within the Form Builder, or the “Save Form and Manage Connector” button on the Edit Choices: Salesforce modal. Dynamic Picklists can be added to existing prefill connectors or a new one can be created.
Step 3: Select Relevant Salesforce Object
To begin, select the type of Salesforce object that contains the information you need to retrieve. This information could be records for that object, or particular picklist included on the object.
Step 4: Set Object Lookup Query
For a Dynamic Picklist to prefill choices, you must enter a valid query in the Lookup section at the start of the connector. The object lookup query is a powerful tool that can support a variety of operators and multiple conditions. To find the best query, you may need to experiment with different options.
For “Salesforce object lookup results”, your query must logically include all records you would like to display.
For “A Salesforce picklist field”, your query must logically include at least one result that contains your desired picklist.
Here are some examples of popular queries for Account object lookups that will help you configure dynamic picklists:
|Scenario (Object = Account)||Query|
Account records that have a value in the Account Name field
(since Account Name is a required field for all Account records, this query will retrieve all records)
Account Name not equal to Formula: ""
Account records that are active and have the industry set to energy
Active equals Formula: Yes
Industry equals Formula: Energy
Account records that have the industry set to energy or do not have a value for the industry field
Industry equals Formula: Energy
Industry equals Formula: ""
Step 5: Map Your Dynamic Picklist
Scroll down to the section titled Dynamic Picklists and click the Map Your First Picklist button (this section will not appear until you have selected an object for retrieval).
Use the controls to set the choices that will be populated to the Dynamic Picklist field on your form.
These questions: Choices include any question where the source of choices is set to Salesforce.
Get their list of choices from: Choose between pulling data from a list of Salesforce records or all the options on a particular Salesforce picklist.
If you assign a question to get its list of choices from “A Salesforce picklist field,” you will be prompted to specify the name of that picklist. Getting the list of choices from a Salesforce picklist requires a valid lookup query that includes at least one record containing the desired picklist.
If you assign an question to get its list of choices from “Salesforce object lookup results,” you will be prompted to select the field that is displayed for each record. Getting the list of choices from object lookup results requires a valid query that includes all of the records you would like displayed as choices.
Once you have set your values appropriately, click the Check button to confirm. (You will still need to Save your connector settings before any changes take effect). In the event that you need to remove or edit your Dynamic Picklist configuration, you can click the Edit button in each row.
Step 6: Test your Dynamic Picklist
Before you test your Dynamic Picklists, make sure you have:
Saved changes to your form in Form Builder 5.0
Saved changes to your Salesforce Prefill Connector
Enabled the Salesforce Prefill Connector
To test your Dynamic Picklists, you must view the live form.
Choices from Salesforce Object Lookup Results
- Angela is creating a form that will link new business to existing accounts. She already uses the standard Account object to store and manage account information in Salesforce. By using a Dynamic Picklist, she can create a field on her form that will show a choice for each record in her Salesforce instance. As she adds and removes records in Salesforce, the choices on her live form will automatically update.
Choices from Salesforce Picklist
- Amit uses lots of different forms to facilitate student registration. Each of his forms needs a field for the anticipated start term, but the list of available choices changes every semester. By using a dynamic picklist, Amit can populate the “Anticipated Start Term” field with a list of choices from his “Anticipated Start Term” picklist in Salesforce. When Amit updates his picklist in Salesforce, it will automatically update on every one of his forms using that dynamic picklist.
Dynamic Picklist Limits
Dynamic Picklists now have the option of restricting values. You'll be able to toggle the switch to allow or not allow outside values from respondents.
- In the dropdown list on the live form, you will see the first 39 results until you define the query further by typing in a letter.
- Example: Your list has 200 countries. When you look at the form, it will show the first 39 of the list. If you type in a letter, say A, it will show the first 39 items that start with A.
Dynamic Picklists cannot be used in conjunction with conditional questions.