4

I am working on a Azure Logic App that returns an empty array after using Filter function. In the next step, I would like to use a condition that can check if the previous array is empty or not. If the output is empty, Then it will return true and I will do something. So, what is the correct way to write the condition to check if the array is empty ?

Logic app designer view

Filter Array Step in advance mode: @startsWith(item()?['LastModified'], utcNow('yyyy-MM-dd'))

And it returns: []

How to write condition in the next step to check if the body or return value is equal to []. Specially I am not being able to catch this empty array :(

Any help will be highly appreciated, thanks :)

user9513505
  • 45
  • 1
  • 7

1 Answers1

9

You can refer to my Azure logic app:

enter image description here

We need to use the length expression:

length(body('Filter_array'))

The result seems to be no problem:

enter image description here

Frank Borzage
  • 6,292
  • 1
  • 6
  • 19