简体   繁体   English

每个循环的逻辑应用程序以检测空白空间

[英]Logic App For Each Loop to detect empty space

I have a Logic app with nested For each loop which has an array looped in as below:-我有一个嵌套 For each 循环的逻辑应用程序,其中有一个循环如下的数组:-

@items('For_each')?['TicketAssignedTo'] --> This could some times get black array values like "TicketAssignedTo": [ ] which make the loop to succeed but Insert SQL block within this loop would not execute. @items('For_each')?['TicketAssignedTo'] --> 这有时会得到像 "TicketAssignedTo": [ ] 这样的黑色数组值,这会使循环成功,但在此循环中插入 SQL 块将不会执行。 How to detect these blank values and make the control execute the inner block?如何检测这些空白值并使控件执行内部块?

You can use the length function in the expression.您可以在表达式中使用length function Also be mindful to coalesce the value to an empty string before checking the length.还要注意在检查长度之前将值合并为空字符串。

You can add a "If" condition in you logic app to judge the length of your array.您可以在逻辑应用中添加“If”条件来判断数组的长度。 在此处输入图像描述

The expression of length is长度表达式为在此处输入图像描述

but maybe you should use但也许你应该使用

length(body('xxx'))

it depends on the source of your array.这取决于阵列的来源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM