cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
pepeday
Level: Powered On

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
Community Support Team
Community Support Team

Re: ODATA Filter on a Sharepoint Get Items folder field

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
Community Support Team
Community Support Team

Re: ODATA Filter on a Sharepoint Get Items folder field

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

pepeday
Level: Powered On

Re: ODATA Filter on a Sharepoint Get Items folder field

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

Thanks,

Pepe
pepeday
Level: Powered On

Re: ODATA Filter on a Sharepoint Get Items folder field

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?

Community Support Team
Community Support Team

Re: ODATA Filter on a Sharepoint Get Items folder field

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.
pepeday
Level: Powered On

Re: ODATA Filter on a Sharepoint Get Items folder field

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

BlueCar
Level: Powered On

Re: ODATA Filter on a Sharepoint Get Items folder field

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.

pepeday
Level: Powered On

Re: ODATA Filter on a Sharepoint Get Items folder field

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,293)