Is there a way to have the options for a Dropdown form component be dynamic? I am just wanting to query for values that are specific to the authenticated caller and populate the dropdown options with those values.
I have a Lambda integration function which fetches the values from the external system and responds with the proper format for the options array (objects containing a label, description, and value). I've tried to set the array as a Flow/Contact attribute and add the JSONPath in the Sections JSON on the View block but it is complaining about the JSON being invalid.
Here is a little example snippet of what I provided for the dropdown configuration in the Sections JSON:
...
"Type": "Dropdown",
"Options": $.Attributes.dropdownOptions,
...
The dropdownOptions attribute just contains the formatted list of options. Here is an example of what it may be set to based on the Lambda response:
[
{"Description": "Honda Accord", "Label": "Honda Accord", "Value": "1"},
{"Description": "Ford Escort", "Label": "Ford Escort", "Value": "2"}
]
Any suggestions or thoughts would be much appreciated!