/Shared Documents/General/Customer_Inquiries/Customer/Request/Doc.pdf
and in some cases:
/Shared Documents/General/Customer_Inquiries/Customer/Request/Info_for_Customer/Doc.pdf
The issue is that the “Customer” level is not fixed. I have around 30 different customer folders, and each of those contains multiple “Request” folders, which again can contain files and some at least one subfolder "Info_for_Customer". Because of this dynamic structure, I think I cannot use a fixed path in the “Get files (properties only)” filter query (e.g. FileDirRef eq '...'), since that would only target a single branch and ignore all other customers, or am I wrong?
I also tried your approach with FileRef and checking the last segment of the path, but this only tells me whether a file is directly inside some folder it does not ensure that the file is specifically located at the “Request” level. In my case, I need to identify all files that are exactly one level below each “Request” folder across all customers, regardless of which customer folder they belong to.
So the core problem here is not just the incorrect {Path} field, but the fact that I need to filter based on a relative depth within a dynamic folder structure, not an absolute path or a fixed number of segments.
I have added several screenshots again to provide an overview. In the first screenshot, you can see the first level folder "Customer_Inquiries" along with all its customer-subfolders (my Customers). The second screenshot shows an example of a single "Customer" folder containing each request, and the final screenshot shows the structure of a "Request" folder that includes an additional "Info_for_Customer" subfolder.
(I have translated all the folder names into English, but the specific folder names themselves do not really matter)
If you have any suggestions on how to reliably detect files that are directly inside the “Anfrage” level across multiple dynamic parent folders, I would really appreciate it.
Thanks again!