cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
gmcanally
Level: Powered On

Filter Array by variable list of values

I have have a flow using SharePoint - Get Items.

 

I'd like to filter the resulting items by a variable list of item IDs and then output the filtered result to a single csv table (which will be emailed). Neither the Odata query abilities of Get Items nor the Filter Array action appear to allow this.

 

Is this possible?

 

I could of course use an Apply to Each on the array and Get Items separately for each ID, but how would I combine them into a single csv table?

 

Example:

 

Sharepoint list:

ID  ...other columns

___

1

2

3

4

5

 

ID Array:  [1,3,4]

 

Expected CSV table:

ID ...other columns

___

1

3

4

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Array by variable list of values

Hi @gmcanally

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG Capture.PNG

 

The expression of the ID column in the "Create html table" action as below:

item()['ID']

 

The expression of the Title column in the "Create html table" action as below:

 

item()['Title']

 

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

 

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: Filter Array by variable list of values

Hi @gmcanally

 

I have made a test on my side, please refer to screenshot below to create the flow:

Capture.PNG Capture.PNG

 

The expression of the ID column in the "Create html table" action as below:

item()['ID']

 

The expression of the Title column in the "Create html table" action as below:

 

item()['Title']

 

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

 

View solution in original post

Administrator
Administrator

Re: Filter Array by variable list of values

Hello, @gmcanally!

Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-yuazh-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

-Gabriel
Flow Community Manager

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!
gmcanally
Level: Powered On

Re: Filter Array by variable list of values

Thanks! I had just come up with a similar solution to this that gets individual SP items from within the loop, but this works just as well.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,891)