[英]How do I Use an If statement within JSON Adaptive card for Teams to @mention user on Submitted Choice Response?
我已经制作了这张卡片,它可以按照我想要的方式在团队中工作。 我只是不知道如何在提交选择集以@提及个人后将结果通过电源自动传递回 Teams 或使用 if 语句。 实际上,我想使用自适应卡中的选择集来通知团队中的另一个人或不通知。 我相信我必须在卡中包含带有选择集结果的 if 语句,因为数据无法传递给 Power Automate,对吗? 我在哪里插入 if 语句?
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "Appointment Booked For @{triggerOutputs()?['body/from']}",
"id": "Title",
"spacing": "Medium",
"horizontalAlignment": "Center",
"size": "ExtraLarge",
"weight": "Bolder",
"color": "Accent"
},
{
"type": "TextBlock",
"text": "@{triggerOutputs()?['body/subject']}",
"id": "acHeaderTagLine",
"separator": true
},
{
"type": "TextBlock",
"text": "Notify Accounting?",
"weight": "Bolder",
"size": "ExtraLarge",
"spacing": "None",
"id": "acHeader"
},
{
"type": "TextBlock",
"text": "@{outputs('Get_@mention_token_for_Onboarding')?['body/atMention']}: blah blah blah instructions",
"id": "acInstructions",
"wrap": true
},
{
"type": "TextBlock",
"text": "Notify Accounting?",
"id": "acQuestion"
},
{
"type": "Input.ChoiceSet",
"placeholder": "Select from these choices",
"choices": [
{
"title": "Yes, Notify Accounting",
"value": "1"
},
{
"title": "No, this is an exception",
"value": "0"
}
],
"id": "acChoices",
"style": "expanded"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"id": "btnSubmit"
}
]
}
您不能在自适应卡中使用 if 语句。 您可以使用Action.ToggleVisibility您可以在用户单击按钮时执行操作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.