cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

ODATA Filter on a Sharepoint Get Items folder field

Hey there

I'm trying to filter a Sharepoint list using the get items action and ODATA, based on the folder the item is placed in.

The actual field is a {} field and no operation works on it (eh substringof) and I suspect that this field is not exposed to the ODATA Filter.

Any ideas how to perform this filter?

Thanks,

P
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @pepeday,

 

I also tried on my side, it seems that I can't rely on the folder to filter the items.

First, Filter array needs to rely on the SharePoint list column as a conditional filter. Obviously, the field such as folder filed does not exist in the body of the Get items action output.

For specific usage of Get items action, please refer to link:

https://docs.microsoft.com/en-us/connectors/sharepointonline/

In addition, in the body of Get items action output, you can find that Path of the item will be different because of folder the item is placed in. Maybe this is the condition that can be used for filtering.

You could use the Filter array to filter the Path and get the corresponding items.

25.PNG24.PNG

Please take a try.

 

Best Regards,

Barry

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

View solution in original post

7 REPLIES 7
Highlighted
Community Support
Community Support

Hi @pepeday,

 

I also tried on my side, it seems that I can't rely on the folder to filter the items.

First, Filter array needs to rely on the SharePoint list column as a conditional filter. Obviously, the field such as folder filed does not exist in the body of the Get items action output.

For specific usage of Get items action, please refer to link:

https://docs.microsoft.com/en-us/connectors/sharepointonline/

In addition, in the body of Get items action output, you can find that Path of the item will be different because of folder the item is placed in. Maybe this is the condition that can be used for filtering.

You could use the Filter array to filter the Path and get the corresponding items.

25.PNG24.PNG

Please take a try.

 

Best Regards,

Barry

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

View solution in original post

Highlighted

Hey bacao, while your solution is not exactly on using the ODATA Filter, it looks like a very usable workaround!

Thanks,

Pepe
Highlighted

Coming back to this, you mentioned that the folder does not exist in the output of the GET ITEMS body. That's not true! Checking the output shows that there is a "{Path}" element! So could be use this?

Highlighted

Hi @pepeday,

 

Sorry, I gave the wrong guide. I also found this filed before, but after testing, I found that this column does not seem to work well in the Filter query.

I tried to use "{Path} eq 'Lists/Check/Test/'" or "{Path} eq Lists/Check/Test/" in the Filter query, and I have reported a similar test in other Threads. It doesn't seem to work here.

 

Best Regards,

Barry

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

Thanks for coming back to this. I will open a suggestion with the Flow team for the following reason:

 

Get Items limits items to 5000 per list. By using as many ODATA filters as possible, we are ensuring that we remain under the 5000 limit. For me, a folder filter can reduce the items retrieved by 50% so it's quite critical in the future that I find a workaround.

 

Pepe

Highlighted

Hi @pepeday 

Did you find a solution for the {Path} issue? I'm dealing with it right now and like you, I have more than 5000 items, so the filtering needs to be done using the ODATA filter.

Highlighted

I've completely given up in using Sharepoint in this manner as I feel it was never designed as a database. Instead I've set up an Azure SQL managed instance, which allows me more flexibility.

 

Pepe

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (4,842)