Home > Back-end >  Azure Logic App: Filter array with multiple conditions
Azure Logic App: Filter array with multiple conditions

Time:12-20

I am using filter array method to get list of blobs which are added within last 5 minutes (Last modified is less than 5 min) and if blob display name contains specific test(word Test in my case).

My logic: enter image description here

I am using below condition for filtering array

@and(less(item()?['LastModified'], addMinutes(utcNow(), -5)), contains(item()?['DisplayName'], 'Test'))

But contains(item()?['DisplayName'], 'Test') only working, last modified is getting ignored.

How can I resolve this issue ?

CodePudding user response:

blobs which are added within last 5 minutes

Change less(item()?['LastModified'], addMinutes(utcNow(), -5)) to greater(item()?['LastModified'], addMinutes(utcNow(), -5)).

  • Related