Azure 逻辑应用 if 语句
Azure logic apps if statement
我正在构建一个应用程序,它主要检查广告用户是否被 HR 解雇,如果它发送带有 3 个选项的团队消息。选项是删除用户、禁用用户和不对用户执行任何操作。管理员单击适当的选项后,团队会发送另一条消息,确认已完成以及该操作使用的选项。
所以问题是我只能对 return 3 个选项中的 2 个进行 if 语句。有没有办法让它检查所有 3 个选项并且 return 只检查一个被使用的选项?
当我点击选项时,submitActionId 总是正确的
这是我的 if 语句 if(equals(body('KDVPRequestUserDelete')['submitActionId'], 'Confirm'),'Delete','Disabled')
我的团队操作按钮如下所示:
"actions": [
{
"horizontalAlignment": "Left",
"type": "Action.Submit",
"title": "Ištrinti",
"style": "positive",
"id": "Confirm",
"data": 1,
"iconUrl": "https://cdn2.iconfinder.com/data/icons/flat-style-svg-icons-part-1/512/cancel_delete_remove_stop-512.png"
},
{
"horizontalAlignment": "Right",
"type": "Action.Submit",
"title": "Išjungti",
"style": "positive",
"id": "Change",
"data": 2,
"iconUrl": "https://cdn3.iconfinder.com/data/icons/leto-arrows-1/64/_cancel_disable-256.png"
},
{
"type": "Action.Submit",
"title": "Nedaryti nieko",
"id": "Nothing",
"data": 3,
"iconUrl": "https://cdn3.iconfinder.com/data/icons/social-messaging-ui-color-line/254000/172-512.png"
}
]
}
只需要在if语句中嵌套一个if语句,例如:
if(equals(2, 1), 'yes', if(equals(1, 1), 'yes', 'no'))
如果2等于1,return是,如果不成立,继续比较1是否等于1,如果成立,return是,如果不成立, return 没有.
我正在构建一个应用程序,它主要检查广告用户是否被 HR 解雇,如果它发送带有 3 个选项的团队消息。选项是删除用户、禁用用户和不对用户执行任何操作。管理员单击适当的选项后,团队会发送另一条消息,确认已完成以及该操作使用的选项。
所以问题是我只能对 return 3 个选项中的 2 个进行 if 语句。有没有办法让它检查所有 3 个选项并且 return 只检查一个被使用的选项?
当我点击选项时,submitActionId 总是正确的
这是我的 if 语句 if(equals(body('KDVPRequestUserDelete')['submitActionId'], 'Confirm'),'Delete','Disabled')
我的团队操作按钮如下所示:
"actions": [
{
"horizontalAlignment": "Left",
"type": "Action.Submit",
"title": "Ištrinti",
"style": "positive",
"id": "Confirm",
"data": 1,
"iconUrl": "https://cdn2.iconfinder.com/data/icons/flat-style-svg-icons-part-1/512/cancel_delete_remove_stop-512.png"
},
{
"horizontalAlignment": "Right",
"type": "Action.Submit",
"title": "Išjungti",
"style": "positive",
"id": "Change",
"data": 2,
"iconUrl": "https://cdn3.iconfinder.com/data/icons/leto-arrows-1/64/_cancel_disable-256.png"
},
{
"type": "Action.Submit",
"title": "Nedaryti nieko",
"id": "Nothing",
"data": 3,
"iconUrl": "https://cdn3.iconfinder.com/data/icons/social-messaging-ui-color-line/254000/172-512.png"
}
]
}
只需要在if语句中嵌套一个if语句,例如:
if(equals(2, 1), 'yes', if(equals(1, 1), 'yes', 'no'))
如果2等于1,return是,如果不成立,继续比较1是否等于1,如果成立,return是,如果不成立, return 没有.