cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gj84uw
Helper II
Helper II

Odata filter query using path

Hi everyone

I want to have a flow run at set times that checks if files have been moved between folders in a library.  To do this I have created a custom column in the library called OriginalPath and this is populated with the file path when a new document is created.  My scheduled flow then checks for all documents in the library where the path and original path don't match.

At the moment I can only do this by using Get Files (Properties Only) and then filtering this output by documents where the original and current paths don't match and where IsFolder is false ( I only want to check documents not folders):

Capture.PNG

This works fine but the issue I have is that eventually this library will grow and the number of documents will be over 5,000.  As I understand it, the maximum number of files that can be brought back by Get Files is 5,000 so if there are more than that they won't all be queried and my filter may not show all the documents it should?

To get around this potential issue I wanted to use the OData filter query in Get Files.  However, I can't seem to reference IsFolder or Path as it says these columns cannot be found.  Is there any way of referencing these files in OData or will I just have to find a way of limiting the library to under 5,000 for this to work?

Any advice would be gratefully received.

Thanks.

3 REPLIES 3
v-alzhan-msft
Community Support
Community Support

Hi @gj84uw ,

 

I have made a test on a new library and don't have the issue that you mentioned.

I couldn't find the dynamic content of the new column "OriginalPath" in an old library if the column "OriginalPath" is new created.

Please take a try to create the flow on a new library and let me know if the issue still exists.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-alzhan-msft 

Thanks for your reply.  The issue I have is that I can't use the Path of the file in the OData filter query.  This field can be accessed in the flow but no matter how I try and type this into the OData filter I get an error saying the column can't be found:

Capture.PNG

 

Capture2.PNG

 

I just wondered whether there's a way to reference the path column in an OData filter, or whether I have to stick with my current setup and use the filter step to do this?

Having a similar issue, in that I'm trying to create an OData filter on the "Folder Path" ({Path} field) but am not able to reference it.  All I've been able to deduce so far is that any hidden fields (path, identifier, isfolder, link, contenttype, etc.) require a different way of referencing to get them to pull into an OData query, but I'm not familiar enough with OData to get it to work.

 

I'll repost if I figure anything out.

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (47,859)