adaptive-cardsbot-framework-composer

Is there a way to give the ChoiceSet a dynamic array of choices in an adaptive card?


I am getting some data from an API call and I want to display them in an adaptive card as a choice set, then the user will be able to choose one or more choices to do action on them. The problem is that the array of choices is dynamic. My question is how to pass an array to the choice set in the adaptive card. I am writing the adaptive card on https://adaptivecards.io/designer/

here is an example of what I want: enter image description here


Solution

  • Here is the way to do this:

    Set the array in this way, each value has title and value as choices: enter image description here

    And from the adaptive card, in the ChoiceSet, call it this way: enter image description here