Has anyone had any success using the Filter Odata functionality in the Sharepoint Get Files (properties only) action? I can only get it to work for basic equals comparisons. Anything using greater than, or less than produces a Bad Gaetway error.
I have also found that any attempts to do string comparisons, such as startsWith are invalid.
It appears that the functionality works in the SharePoint Get Items actions, but not the Get Files.
Solved! Go to Solution.
Hi @AJGilbey,
Thanks for the info on you tests. I set up the library to contain more than 5k items in it, and tried the flow with and without an indexed column. I can confirm that the flow will fail with more than 5k items if the column used in the Filter Query is not indexed. I then tried it after indexing the column and the flow worked just fine.
When you can, please select a solution in this thread in the event other folks run into the same thing we did so they can see a solution.
Thanks,
Fausto Capellan, Jr
Hi AJGilbey,
I assume that this doc could be your reference, please check it at here:
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-...
I have tested the Odata filter for the action “SharePoint – Get files(properties only)” with the action eq, gt, and startswith, they are all working for me
The following screenshot are the functions I tested:
What’s the function you are using on your side?
Please try again with it.
Best regards,
Mabel Mao
Hi Mabel,
Here is what I get when I attempt the same action as you. Does it make a difference that the documents are located in an Office 365 Group site?
Regards
Adam
Hi @AJGilbey,
I tried the suggestions made by @v-yamao-msft and it worked for me. Not sure why it wouldn't work for you.
Hi @AJGilbey,
My previous test was on a regular Document library inside a SharePoint site, not an Office 365 Group site, but I just performed some tests on a Document library inside an Office 365 Group site and it worked fine. I added two columns with multiple words as you mentioned, and Flow was able to retrieve the files based on the specific filter I applied. I used the same "startswith" filter query on multi word column and it worked. The screenshots below have the Document library structure and the results from the Flow activity. FYI, I am starting this flow manually since I didn't see any indications of the flow using a different trigger.
Flow Activity
Document Library
Thanks @faustocapellanj, @v-yamao-msft,
At least I have confidence that the issue is isolated to my environment. I will continue to run tests to try and identify the particular cause.
Hi,
Further testing has revealed that the issues occur only in Document libraries that have over the 5,000 document threshold - even when using Indexed columns for the filter.
@faustocapellanj, are you able to test this theory?
An update - Indexed columns seem to work.
Hi @AJGilbey,
Thanks for the info on you tests. I set up the library to contain more than 5k items in it, and tried the flow with and without an indexed column. I can confirm that the flow will fail with more than 5k items if the column used in the Filter Query is not indexed. I then tried it after indexing the column and the flow worked just fine.
When you can, please select a solution in this thread in the event other folks run into the same thing we did so they can see a solution.
Thanks,
Fausto Capellan, Jr
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
45 | |
43 | |
43 | |
42 | |
32 |
User | Count |
---|---|
83 | |
81 | |
60 | |
50 | |
44 |