cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mdemarici123
Frequent Visitor

Get Files (Properties Only) ODATA Filter to filter files that match criteria on a separate SharePoint List

Hi All, 

 

I am having trouble building a summary email flow that gets files based on values in a separate list.

 

Context: my organization uploads files to SharePoint which are tagged with a 'document type' and also a category ID that we created. What I want to do is grab files that are within a given document type and also match against a list of certain category IDs that are contained in a SharePoint List.

 

Lets say I want to send a weekly file summary for files uploaded with IDs that are in the Red Category in the past week, I would have a Red Category ID SharePoint List like this...

 

Red Category ID's (SharePoint List)

Title Type

1       Red

2       Red

3       Red

4       Red

 

How can I filter ODATA or Filter the Array on the Get Files (Properties Only) to only get files that match the document type and also match a category ID from a separate SP List? I am using get files and get items then trying to use a filter array step but nothing i am doing seems to filter it the way I need. 

 

Thanks!

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Mdemarici123 

This is my test list.

vLilyWmsft_1-1638518878780.png

Assume I have a library like below, I set up a flow to filter out items whose created date is last week, type is red and categoryID exists in the list. Then send an email.

vLilyWmsft_0-1638518729853.png

You can refer below screenshots to see if it helps.

Flow in details:

I set to run flow once every Monday.

vLilyWmsft_2-1638518955669.png

Set a variable .

vLilyWmsft_3-1638519014031.png

Get the date of previous Monday.

vLilyWmsft_6-1638519188308.png

Get the date of previous Sunday.

vLilyWmsft_7-1638519202724.png

Add get items action to obtain the item whose type is Red.

vLilyWmsft_8-1638519236214.png

vLilyWmsft_15-1638520694523.png

vLilyWmsft_11-1638519549466.png

vLilyWmsft_12-1638519764297.png

vLilyWmsft_13-1638519819037.png

After flow runs,I will receive an email like this:

vLilyWmsft_14-1638520179257.png

Hope the content above may help you.

Best Regards

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
v-LilyW-msft
Community Support
Community Support

Hi @Mdemarici123 

Are the ‘document type’ and ‘category ID’ columns in your library?

Does the ‘category ID’ match the Title in the Red Category ID's (SharePoint List)?

Could you please provide the screenshots of the Flow configuration?

Best Regards.

Mdemarici123
Frequent Visitor

Hi There @v-LilyW-msft

Thank you for taking the time to respond. Yes, both Category ID and Document type are in the library and Category ID is supposed to match the 'title' in the Red list. 

 

I am trying to see if there is an ODATA filter that I can put into the 'get files (properties only) action that will check the gathered files and match the ones with the same Category IDs that are obtained in the get items action above.

 

Everything I have tried has not worked and I just wanted to see if there is is something I am not thinking about.

 

Mdemarici123_0-1638464557997.png

 

Hi @Mdemarici123 

This is my test list.

vLilyWmsft_1-1638518878780.png

Assume I have a library like below, I set up a flow to filter out items whose created date is last week, type is red and categoryID exists in the list. Then send an email.

vLilyWmsft_0-1638518729853.png

You can refer below screenshots to see if it helps.

Flow in details:

I set to run flow once every Monday.

vLilyWmsft_2-1638518955669.png

Set a variable .

vLilyWmsft_3-1638519014031.png

Get the date of previous Monday.

vLilyWmsft_6-1638519188308.png

Get the date of previous Sunday.

vLilyWmsft_7-1638519202724.png

Add get items action to obtain the item whose type is Red.

vLilyWmsft_8-1638519236214.png

vLilyWmsft_15-1638520694523.png

vLilyWmsft_11-1638519549466.png

vLilyWmsft_12-1638519764297.png

vLilyWmsft_13-1638519819037.png

After flow runs,I will receive an email like this:

vLilyWmsft_14-1638520179257.png

Hope the content above may help you.

Best Regards

 

 

 

 

 

 

Mdemarici123
Frequent Visitor

@v-LilyW-msft Thank you so much for taking the time to walk me through this, it worked perfectly!

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,386)