Dynamic dropdowns: a dropdown filled by a workflow, one that reloads when another answer changes, and a client's Microsoft users (1:29).
Options sources
Fill a dropdown from a workflow
A Department dropdown filled by a workflow; a Code step stands in for a lookup in your PSA.Build the workflow

Publish the list
departments as the Context Variable Name, tick Publish Variable and save the workflow.
Point the field at it
{} as Workflow Parameters (left blank, the list stays empty) and departments as Published Variable Name. Value Field and Label Field already hold id and name. Save the form.
Try it

What the workflow receives

ctx.client is empty until a Set Client From Form step runs. After it, a Code step can return ctx.client.sites; to list a client variable sites holding [{"id": "ldn", "name": "London"}]. Without a client, the dropdown stays empty.
What it must return
- One published variable holding a list of objects, such as
[{ "id": "finance", "name": "Finance" }]. - Each item needs the Value Field and Label Field keys; items missing either are left out. Numbers and
true/falsebecome text. - Items whose Preselected Field key is true start selected: the first for a Select, all of them for a Multi Select.
- The run must reach Finish Workflow. Its Outcome isn’t used.
When it runs
The workflow runs, uncached, when the form opens, when the field appears after being hidden, when a watched field changes and when the person clicks the reload button. The field shows a spinner for up to 5 minutes, so keep the workflow to a few seconds; for slow lookups, fill a cache on a schedule and use Use cache instead.Reload options when another answer changes
A Team dropdown listing the teams in the chosen Department. Watch Fields reload a field’s options whenever another field changes.Build a workflow that reads the answer
teams from a Code step that reads ctx.params.department. Marking the first team isDefault selects it.Watch Department
isDefault. Under Watch Fields, click Add Watch Field and choose Department.

Try it

- The field reloads half a second after the watched field’s last change, and only while it’s visible.
- Only Use workflow reads the other answers. Other sources reload with the same list.
- A reload keeps the current answer, even one no longer listed, unless the workflow preselects an option.
- Team here also has a condition to show only when Department Is Not Empty.
Other sources
Microsoft
Choose the Data to list. Users can leave out disabled, unlicensed or guest accounts; Groups can be narrowed by type; Domains can leave out onmicrosoft.com domains.
defaultMicrosoftConnection: microsoftGDAP, microsoftSAM or CIPP. Set it before you use a Microsoft list; without it the list stays empty. On Google-authenticated forms, Groups lists nothing.
To try a Microsoft list in Preview, use an Internal form with Manually Set Client: Preview asks for the client first.
Integration
Choose an integration’s list, such as HaloPSA’s Get Ticket Types or CIPP’s List Users, and fill in any Action Variables. The integration sets each option’s label and value. Results are reused for a minute; the reload button fetches a fresh list.
Form params and default values
A form link can carry URL-encoded JSON in?params=, such as ?params={"offices":[{"id":"ldn","name":"London"}],"office":"ldn"}. Use form params lists the offices items; Default Value Source From parameters picks the answer from the office key.

Troubleshooting
My workflow dropdown says “No options found”
My workflow dropdown says “No options found”
{}, the Published Variable Name matches the Context Variable Name exactly, Publish Variable is ticked, and every item has the Value Field and Label Field keys. Then open the latest run on the workflow’s Runs page.Microsoft or integration options are empty
Microsoft or integration options are empty
defaultMicrosoftConnection is set. Otherwise the form has no client: use Microsoft or Google authentication and test as a client user with Share Form > Impersonate, or Internal with Manually Set Client and pick the client in Preview.The second dropdown doesn't change when I change the first
The second dropdown doesn't change when I change the first
ctx.params.<Field ID>. To replace a stale answer on each reload, set Preselected Field as in the Team example.“Error saving form - builder validation failed: field team watchFields[1] is empty”
“Error saving form - builder validation failed: field team watchFields[1] is empty”
Can I fill a dropdown from a client variable?
Can I fill a dropdown from a client variable?

