0

I would like to make a callout using Apex and use the return data to set the options in a picklist screen component of a flow. Is this possible and if yes, how should I go about it (I believe I need to create 1) an Apex-defined collection variable to hold the return data and 2) a choices variable to populate the picklist. However, I cannot seem to find a way to set the Choice Value attribute of the Choice variable to a value from the collection variable)

Follow-up: I found how to set the value of a Choice resource using the return data but unfortunately it is impossible to create a collection variable of type Choice with which you can then populate a picklist using the standard flow builder functionality at the moment. You would have to create individual variables of type Choice and manually add them as picklist choices.

1

The Choice resource is limited in its application and can't do what you want. However, the Quick Choice component can be installed and will happily accept a couple of string collections (one for the values and one for the labels) returned by your Apex invocable action

| improve this answer | |
  • Glad to know there are some workarounds out there. – user73893 Feb 13 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.