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!
Solved! Go to Solution.
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')}')
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.'.
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')}')
That's it now! Thank you!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
64 | |
55 | |
29 | |
27 | |
25 |