cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
efialtes
Level 8

Can we use WDL expressions (i.e. utcnow(), adddays, etc) in Filter Arrays?

Hi all

I am trying to build a flow with the Recurrence trigger; the first action is Sharepoint Get Items from a Sharepoint List. I want to filter the output items and get just the ones meeting a certain condition (date comparison).

OPTION 1.- I understood ODATA filter is not available for such Action block.

OPTION 2.- I also understood a Condition Block is not valid since the output is an array, 

OPTION 3.- I implemented an Array Filter

 

If I use a simple expression (first example in the screenshot) the flow is compiled properly; however if I add WDL expressions to compare Date column ('Fecha') from sharepoint list with current date, a validation error is shown (second example in the screenshot, please also note part of the error text cannot be displayed).

I also tried with the ? character between item() and ['Fecha'[ with the same result.

 

Can we use WDL expressions (i.e. utcnow(), adddays, etc) in Filter Arrays? If so, can anybody help me find the error?

BR

WDLvsFilterArray.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: Can we use WDL expressions (i.e. utcnow(), adddays, etc) in Filter Arrays?

Hi efialtes,

 

I think you can use something like this @less(item()?['LastModified'], 'adddays("2015-03-15T13:27:36Z", -20)')

espcially pay attention to the double quote " instead of single one.

I also recommend you can try simple mode instead of advanced mode first.

I created a similiar flow

filter-array2.png

Thanks,

Teng

View solution in original post

2 REPLIES 2
Microsoft Employee

Re: Can we use WDL expressions (i.e. utcnow(), adddays, etc) in Filter Arrays?

Hi efialtes,

 

I think you can use something like this @less(item()?['LastModified'], 'adddays("2015-03-15T13:27:36Z", -20)')

espcially pay attention to the double quote " instead of single one.

I also recommend you can try simple mode instead of advanced mode first.

I created a similiar flow

filter-array2.png

Thanks,

Teng

View solution in original post

efialtes
Level 8

Re: Can we use WDL expressions (i.e. utcnow(), adddays, etc) in Filter Arrays?

Thank you for your feedback, @telu! Now I can save the flow. The execution fails, but that's another story already reported in another thread

https://powerusers.microsoft.com/t5/Flow-Forum/Condition-problems/td-p/7495

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 179 members 4,436 guests
Please welcome our newest community members: