【发布时间】:2020-09-21 00:18:38
【问题描述】:
我有以下具有三个 Input.Toggle 的自适应卡片 JSON 代码。当用户单击“提交”并且所有三个 Input.Toggle 都未设置为 true 时,有没有办法抛出错误?我在 Schema Explorer (Schema Explorer Input.Toggle) 中看到它们具有称为“fallback”和“requires”的继承属性,这是我需要的吗?如果是这样,我如何在这个 JSON 代码中实现“回退”和“要求”?
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"placeholder": "1.1 Business Office Coordinator - RFQ Receipt",
"type": "Input.Text",
"id": "Title"
},
{
"text": "Quote #@{body('Get_response_details')?['b194cde8837234ccc80fu5017c1b0f869']} ",
"type": "TextBlock",
"id": "textBlock1"
},
{
"type": "Input.Toggle",
"title": "Customer Acknowledgement",
"valueOn": "custYes",
"valueOff": "custNo",
"id": "Customer"
},
{
"type": "Input.Toggle",
"title": "Create RFQ Log Number and Enter Information into RFQ Log",
"valueOn": "RFQYes",
"valueOff": "RFQNo",
"id": "RFQ"
},
{
"type": "Input.Toggle",
"title": "Populate Quote Folder with Customer Data",
"valueOn": "PopulateYes",
"valueOff": "PopulateNo",
"id": "Populate"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"data": {
"id": "9876543210"
}
}
]
}
【问题讨论】:
标签: json adaptive-cards power-automate