Dynamic Dropdown Options on a Form View (Step-by-Step Guide)

0

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!

질문됨 9달 전62회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠