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

power automate get files (properties) only filter query not working

I tried to limit the get files (properties) only action to return only files under the current document set name. For example, I have a document set named DocumentRequest/MIKE 6-25 VERSIONING TEST_2020-6-25 14_21_12, which has 2 files.

 

the filter query should return just those two files.   I put FullPath eq FullPath from dynamic content as the filter query.

FullPath is the property in the json file returned from get files (properties) only action. 

 

2020-06-28_16-54-08.jpg

 

Keep getting error,  what is not right here?

2020-06-28_16-50-16.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper I
Helper I

Re: power automate get files (properties) only filter query not working

Finally, I got it working, after many trials and errors. No good documentation about how it should work. 

 

1. In GetFiles(Properties only) the filter query should  be: ID equal 150
ID is literal, can't use ID from dynamic content; 150/number can't use single quote (but the text value need single quote!)

property with {} in response content can't be used.

 

2. Use RequestName (property in the response content) to match requestname column in Dynamic Content to filter down to the current document set and its files

 

2020-07-03_17-34-55.jpg

View solution in original post

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: power automate get files (properties) only filter query not working

Hi @MWAN 

 

It could be the slash in your FullPath creating the issue.

 

Try encode the FullPath value by using an expression encodeUriComponent.
 
Thanks


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper I
Helper I

Re: power automate get files (properties) only filter query not working

Thanks for checking.

 

I have two fullpath in the filter query, which one you referred to?

How to encode the FullPath value by using an expression encodeUriComponent? Please give an example.

 

Appreciated!

Highlighted
Super User III
Super User III

Re: power automate get files (properties) only filter query not working

Hi @MWAN 

 

Add a compose and add the expression. Please see below.

 

First click the expression then type encodeUriComponent(). Next click Dynamic Content and select FullPath.

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper I
Helper I

Re: power automate get files (properties) only filter query not working

I used the encodeURIComponent() in Compose, still failed

 

2020-06-29_17-22-22 action.jpg2020-06-29_17-20-49-error.jpg

Highlighted
Super User III
Super User III

Re: power automate get files (properties) only filter query not working

Hi @MWAN 

 

You need single quotes after the equal in your filter query.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper I
Helper I

Re: power automate get files (properties) only filter query not working

Sorry, still failed... wrap single quote around fullpath after eq

 

The expression "DocumentRequest%2FGeorge%20testing%200629_2020-6-29%2010_29_45 eq 'DocumentRequest/George testing 0629_2020-6-29 10_29_45'" is not valid. Creating query failed.

 

DocumentRequest%2FGeorge%20testing%200629_2020-6-29%2010_29_45 won't match 'DocumentRequest/George testing 0629_2020-6-29 10_29_45'

Highlighted
Super User III
Super User III

Re: power automate get files (properties) only filter query not working

Hi @MWAN 

 

Thanks for the screen share. You won't be able to do the ODATA filter for the below file properties. Not sure what object type these are. You can do the filter by ID. 

 

image.png

 

If you would like to filter by path using the ODATA filter query then use a custom column to update the path using another flow and use this new custom column to filter your results. This may works for you.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper I
Helper I

Re: power automate get files (properties) only filter query not working

The response data has id property so I put ID(dynamic content) eq '150' but still got an error: The query is not valid.

 

My purpose is to get the ID item property of the file items under a document set using Filter Query in Get Files (properties) only action.

 

 

Highlighted
Super User III
Super User III

Re: power automate get files (properties) only filter query not working

Hi @MWAN 

 

 

Could you try without the single quotes? If that doesn't work please post a screenshot of your flow?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper I
Helper I

Re: power automate get files (properties) only filter query not working

Finally, I got it working, after many trials and errors. No good documentation about how it should work. 

 

1. In GetFiles(Properties only) the filter query should  be: ID equal 150
ID is literal, can't use ID from dynamic content; 150/number can't use single quote (but the text value need single quote!)

property with {} in response content can't be used.

 

2. Use RequestName (property in the response content) to match requestname column in Dynamic Content to filter down to the current document set and its files

 

2020-07-03_17-34-55.jpg

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (5,902)