布尔值在Logic App条件下不起作用(Boolean not working in Logic App condition)

编程入门 行业动态 更新时间:2024-10-25 13:16:28
布尔值在Logic App条件下不起作用(Boolean not working in Logic App condition)

在Logic Apps条件下使用布尔值的正确方法是什么? 如果将bool设置为true,则工作流应该在YES分支中继续,但我始终以此错误消息结束:

ActionBranchingConditionNotSatisfied。 跳过模板操作“HTTP”的执行:不满足此操作的分支条件。

{ "reservations": { "sendBooking": true }}

What is the proper way to use booleans in Logic Apps conditions? If the bool is set to true, the workflow should continue in the YES branch but I allways end up with this error-message :

ActionBranchingConditionNotSatisfied. The execution of template action 'HTTP' skipped: the branching condition for this action is not satisfied.

{ "reservations": { "sendBooking": true }}

最满意答案

如果您在条件卡中切换到“高级模式”,您应该看到表达式看起来像@equals(triggerBody()?['sendBooking'], 'true')

将它更新为@equals(triggerBody()?['sendBooking'], true) ,你的逻辑应该可行。

这是因为,默认情况下,我们将true视为字符串,但在这种情况下,它必须是布尔值。

上面的解决方法应该解锁您,我将与团队讨论如何更好地处理这种情况。

If you switch to "Advanced mode" in the condition card, you should see the expression looks like @equals(triggerBody()?['sendBooking'], 'true')

Update it to @equals(triggerBody()?['sendBooking'], true) and your logic should work.

This is because, by default, we treat true as a string, but in this case it needs to be a Boolean.

Workaround above should unblock you, I will discuss with the team to see how can be better handle this scenario.

更多推荐

本文发布于:2023-08-05 14:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1434067.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条件下   不起作用   布尔值   Logic   condition

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!