Dynamic dropdowns and lookups

What dynamic dropdowns do

A dynamic dropdown sources its options from Salesforce records instead of a fixed list. It works on any choice question: dropdown, multi select, radio buttons, checkboxes and rating. This is also how you build lookup field behaviour, where the choices are records of a related object and the stored value is a record id.

Enabling it

On a choice question, turn on Use Dynamic Options. When enabled, the manual choice list and the built in external URL choices are disabled, and the options are computed from the object you pick.

Configuration

Option Purpose
Object The Salesforce object to source records from
Custom SOQL Filter An optional filter that limits which records appear
Value Field The field whose value is stored when an option is chosen
Label Field The field shown to the user

Lookup behaviour

If the question is mapped to a lookup field, the object is locked to the lookup's target object, the value field is forced to the record id, and the label choices come from the target object's fields. This gives you a working lookup: the user searches records of the related object and the form stores the selected record id in the lookup field.

For a non lookup dynamic dropdown, the value field defaults to Name and you choose what to display as the label.

Mapping a question to a field never makes it read only. Read Only is a manual choice you make in the property grid. Previously (versions < 10.1) the builder set it automatically for fields it considered not updateable, which caught master-detail fields and any field the form author could not edit, so questions rendered read only for the completing user. That no longer happens. Forms built before this change may still carry Read Only on the question and need it unticked once.

The custom filter

The custom SOQL filter limits the records offered. It is authored in the builder, validated against the chosen object, and stored encrypted in the form definition. It is decrypted and applied on the server when the options are fetched, so a public user cannot alter it in the browser. Use it to scope options, for example only active records or records owned by the current context. See Security architecture.

Search and select

At runtime the dropdown searches the chosen object as the user types and returns matching records, so a large object stays usable. The selected option resolves back to its display record so the choice shows correctly when the form is reopened or previewed.

Records with a blank value field are not offered, because there is nothing to store when they are picked. Records with a blank label field show their value instead. Pick a value field that is always filled in, such as the Id, CaseNumber or an external id. Previously, a record with a blank value field showed up as [object Object].

When to use it