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

Odata Filter on the Folder Path using Get Files (Properties only)

Hi, 

I have seen three or four people asking this message already, but I haven’t found a good solution yet. 

End goal steps are the following: 

  1. Flow Runs Daily
  2. Flow checks a specific folder in SharePoint
  3. Flow checks Column "Last Revised/Reviewed Date" 
  4. If Date in said column was one year ago then flow pulls that item and adds it to list of pulled items
  5. HTML Table is made using all of the pulled items
  6. Email is sent containing the HTML table showing all outdated items. 

Here is what I have now:

That goes down to this:

Obviously this just grabs every single item in the entire library rather then just a specific folder. 

I have found that this works to get the array down into just a specific folder: 

However, the output of that is just a Body and an Item, so I cant build my HTML table like I was with just that info. 

 

So I guess he question is can I somehow filter the original query by folder, if not is there a way to take my filtered array and pull out the same data I have in the HTML table so I can still format it the same way I do now? 

 

Any help or links are appreciated. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Odata Filter on the Folder Path using Get Files (Properties only)

Hi @TomToms ,

 

How is your current situation, has solved your problem? if not, please refer to the following method.

 

The way you filter the files in the specified folder is correct. When configuring the value of HTML table, you need to use Expression.

Like: item()['ColumnName'].  if there is a space in the middle of the field name, you may need to replace the space with “_x0020_”.

Image reference:

10.PNG

 

You could also consider using another method to configure Flow.

  • Use array variables to store the column that needs to be displayed in HTML table.
  • Configure Get files action to get all the files in the specified library.
  • Iterate through Value of the previous step, use condition to filter the matching files, and append relevant information to the array variable.
  • Use the variable as the resource for HTML table. This configuration avoids the hassle of using Expression and avoids editing errors.

Image reference:11.PNG

Apply to each configuration details:

12.PNG

Please take a try.

 

Best Regards,

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

1 REPLY 1
Community Support
Community Support

Re: Odata Filter on the Folder Path using Get Files (Properties only)

Hi @TomToms ,

 

How is your current situation, has solved your problem? if not, please refer to the following method.

 

The way you filter the files in the specified folder is correct. When configuring the value of HTML table, you need to use Expression.

Like: item()['ColumnName'].  if there is a space in the middle of the field name, you may need to replace the space with “_x0020_”.

Image reference:

10.PNG

 

You could also consider using another method to configure Flow.

  • Use array variables to store the column that needs to be displayed in HTML table.
  • Configure Get files action to get all the files in the specified library.
  • Iterate through Value of the previous step, use condition to filter the matching files, and append relevant information to the array variable.
  • Use the variable as the resource for HTML table. This configuration avoids the hassle of using Expression and avoids editing errors.

Image reference:11.PNG

Apply to each configuration details:

12.PNG

Please take a try.

 

Best Regards,

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

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: 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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,040)