简体   繁体   中英

Can i add dynamic input in Input.ChoiceSet in msteams adaptive card? I am getting values from an api call and want to list as an input

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. Statically i can do. Since its dynamic, I tried via choices.data, but in vain

That is not possible as such, the card is static and can't "retrieve" data. You have to pass all available choices into the JSON payload of the card.

In MS Teams however you can do this in multiple steps. In the first card the user selects the first option and submits the card. Then you can send a second card with choices according to the first card.

To my knowledge that's the only way to achieve what you want currently

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM