It's important to note that REDCap focuses on Branching Logic, which means hiding or showing entire fields based on previous answers. It doesn't directly support dynamically changing the options list within a single dropdown based on a prior selection (which is often what people mean by "dynamic dropdown").
However, we can use branching logic to simulate this effect by creating multiple fields and showing only the relevant one.
Goal: We want to ask for a specific US State only if the user selects "USA" as their country.
Concept: We will have one field for the country and another field for the US state. The US state field will only appear if "USA" is selected in the country field.
This tutorial shows how to make a field (like a state dropdown) appear only when a specific option (like "USA") is chosen in a previous field (like a country dropdown).
country.1, USA
2, Canada
3, Mexico
(Here, "USA" is coded as 1).us_state.AL, Alabama | AK, Alaska | AZ, Arizona ...). The codes here don't affect the logic itself, just data storage.us_state field (Step 2), find the Branching Logic section. Click the green double arrow icon () next to it.[country] = "1"
[country] is the variable name of your trigger field (Step 1), surrounded by square brackets.= is the comparison operator (equals)."1" is the coded numerical value for "USA" from Step 1, surrounded by quotes.us_state field itself.us_state) will initially be hidden.1) in the "Country" field (country), the condition [country] = "1" becomes TRUE.2) or "Mexico" (3), the condition [country] = "1" is FALSE, and the "US State" field will remain hidden (or become hidden if they change their answer from USA).If you wanted to ask for Canadian Provinces if "Canada" was selected, you would:
ca_province (Dropdown with provinces).ca_province: [country] = "2"This way, only the relevant follow-up question appears based on the country selection.