cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Help with OData Filters in Flow, when getting Items from Sharepoint

Hi there

 

I have a requirement to update all Files in a Folder in a SharePoint Library when something is triggered. The trigger is working fine but I'm  unable to appy the correct filter using the OData Filter Parameter. Note that I cannot hardcode the OData parameter as the Folder name will be passed in from the trigger

 

I have tried the following but none of them seemed to work (Note my document library is called CRMCustomerFiles and Test123 is a subfolder:

 

Path eq 'CRMCustomerFiles/Test123'

FileRef eq 'CRMCustomerFiles/Test123'

FileRef eq '/CRMCustomerFiles/Test123'

FileDirRef eq '/CRMCustomerFiles/Test123'

FileDirRef eq 'CRMCustomerFiles/Test123'

 

startswith(FileRef,'CRMCustomerFiles/Test123')

startswith(FileRef,'/CRMCustomerFiles/Test123')

startswith(FileRef,'/sites/customer/CRMCustomerFiles/Test123')

 

startswith(FileDirRef,'CRMCustomerFiles/Test123')

startswith(FileDirRef,'/CRMCustomerFiles/Test123')

startswith(FileDirRef,'/sites/customer/CRMCustomerFiles/Test123')

 

Are any of these supported?

 

The only way I've managed to get it working so far is to manually create a column called DocumentPath and then using a workflow set that columns value when a document is created or updated

I then set the column to startswith(DocumentPath,'/sites/customer/CRMCustomerFiles/Test123') and that seems to work. 

 

Any idea ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi F0x,

 

Are you using the action “SharePoint – Get files(Properties only)”?


Are you trying to filter the files that Path is equal to something likes “CRMCustomerFiles/Test123”?


Do you have a column for the Path in your library?


Per my test, the filter query will only work when you have a column for the path.


If you want to filter the file name, you will also need to create a column for the file name.


Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Hi F0x,

 

Are you using the action “SharePoint – Get files(Properties only)”?


Are you trying to filter the files that Path is equal to something likes “CRMCustomerFiles/Test123”?


Do you have a column for the Path in your library?


Per my test, the filter query will only work when you have a column for the path.


If you want to filter the file name, you will also need to create a column for the file name.


Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
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

Hi F0x,

 

Did you find a solution to this?

 

Thanks,

 

Gurpreet

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 Kudoed Authors
Users online (9,525)