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
v-bacao-msft
Community Support
Community Support

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
v-bacao-msft
Community Support
Community Support

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (95,106)