cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RRMX1
Helper IV
Helper IV

Get File Properties Filter Query Errors

Hi,

 

I have a flow that works for another list in SP that I wanted to replicate for a library.

It Recurs every month and has steps to generate the month and year etc. so that in my Get Files Properties step I can use Filter OData to find what items were Modified within that month.

 

All the steps appear to be working but if it gives me the below error at the Get File Properties stage - I know there are items in my Library that were modified in that time frame - is it anything to do with the format the date is in library?  I cannot change this and is set up as Date and Time instead of just Date. Or does it not work for Get File Properties/Libraries when it does work for Get Items/Lists?

 

Any help much appreciated!

 

RRMX1_0-1616578307654.png

RRMX1_2-1616578618551.png

 

RRMX1_1-1616578588844.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @RRMX1,

 

It looks like you are missing a couple of single quotation marks around the formatdatetime output values.

 

Can you try this expression instead. I have also changed the format to use the default 'o' one to see if that makes any difference?

(Modified ge '@{formatDateTime(outputs('First_of_Month'),'o')}') and (Modified le '@{formatDateTime(outputs('End_of_Month'),'o')}')

 

View solution in original post

4 REPLIES 4
Expiscornovus
Super User II
Super User II

Hi @RRMX1,

 

Can you share a screenshot of the configuration of the filter query field in the get files properties only action?

 

Below is btw an example of a filter query which filters by the period you are looking for. Can you test if that one works?

(Modified ge '@{formatDateTime('2021-03-01', 'o')}') and (Modified le '@{formatDateTime('2021-03-31', 'o')}')

 

See below what my filter query is;

Modified ge '@{formatDateTime(outputs('First_of_Month'),'yyyy-MM-dd')} and Modified le '@{formatDateTime(outputs('End_of_Month'),'yyyy-MM-dd')}

 

I tried your suggestion but I get another error;

Unable to process template language expressions in action 'Get_files_(properties_only)' inputs at line '1' and column '29473': 'The template language function 'formatDateTime' expects a timestamp as the first parameter and an optional format string as the second parameter. The function was invoked with '3' parameter(s). Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.

Expiscornovus
Super User II
Super User II

Hi @RRMX1,

 

It looks like you are missing a couple of single quotation marks around the formatdatetime output values.

 

Can you try this expression instead. I have also changed the format to use the default 'o' one to see if that makes any difference?

(Modified ge '@{formatDateTime(outputs('First_of_Month'),'o')}') and (Modified le '@{formatDateTime(outputs('End_of_Month'),'o')}')

 

View solution in original post

That's it now! Thank you!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,399)