首页 > 解决方案 > Microsoft Teams - ms 团队机器人中的多选

问题描述

如何通过自适应卡片在下拉列表中实现多选以填写包含要选择的员工姓名的表格。

如果不是,还有什么其他方法可以通过机器人在 Ms Teams 中实现多选。

这样多选。

标签: botframeworkmicrosoft-teamsadaptive-cards

解决方案


检查并构建样本。检查此示例自适应卡

{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"speak": "<s>Your  meeting about \"Adaptive Card design session\"<break strength='weak'/> is starting at ${formatDateTime(start.dateTime, 'HH:mm')}pm</s><s>Do you want to snooze <break strength='weak'/> or do you want to send a late notification to the attendees?</s>",
"body": [
    {
        "type": "TextBlock",
        "text": "${summary}",
        "size": "Large",
        "weight": "Bolder"
    },
    {
        "type": "TextBlock",
        "text": " ${location} ",
        "isSubtle": true
    },
    {
        "type": "TextBlock",
        "text": "${formatDateTime(start.dateTime, 'HH:mm')} - ${formatDateTime(end.dateTime, 'hh:mm')}",
        "isSubtle": true,
        "spacing": "None"
    },
    {
        "type": "TextBlock",
        "text": "Snooze for"
    },
    {
        "type": "Input.ChoiceSet",
        "id": "snooze",
        "value": "${reminders.overrides[0].minutes}",
        "choices": [
                 {
                "$data": "${reminders.overrides}",
                "title": "${hours} hours",
                "value": "${hours}"
            },
            {
                "$data": "${reminders.overrides}",
                "title": "${minutes} minutes",
                "value": "${minutes}"
            },
                 {
                "$data": "${reminders.overrides}",
                "title": "${seconds} seconds",
                "value": "${seconds}"
            }

        ],
        "isMultiSelect": true
    }
],
"actions": [
    {
        "type": "Action.Submit",
        "title": "Snooze",
        "data": {
            "x": "snooze"
        }
    },
    {
        "type": "Action.Submit",
        "title": "I'll be late",
        "data": {
            "x": "late"
        }
    }
]

}


推荐阅读