简体   繁体   English

有没有办法在自适应卡中为 ChoiceSet 提供一个动态的选择数组?

[英]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.我从 API 调用中获取了一些数据,我想将它们作为选择集显示在自适应卡中,然后用户将能够选择一个或多个选项来对它们执行操作。 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/我在https://adaptivecards.io/designer/上写自适应卡

here is an example of what I want:这是我想要的一个例子: 在此处输入图像描述

Here is the way to do this:这是执行此操作的方法:

Set the array in this way, each value has title and value as choices:以这种方式设置数组,每个值都有标题和值作为选择: 在此处输入图像描述

And from the adaptive card, in the ChoiceSet, call it this way:从自适应卡中,在 ChoiceSet 中,这样调用它: 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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