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

How to filter an array?

Hi,

 

I have a compose variable in a form of an array contains the following value:

Dhruv100322_0-1652677014761.png

 

I am getting items from sharepoint using get items. Once that is done I want to filter that using filter array:

 

There is a column called Channel in SharePoint which is a single choice column. I want to filter the choice so that it only returns the records where the channel value is in Compose variable. Hence, return the value if Channel/Value is either SMS or eMail.

 

An example of a two record.

 

 {
               
                "Channel": {
                    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                    "Id": 0,
                    "Value": "eMail"
                },
                "Channel#Id": 0,
                "CellID": "eM1"
            },
 {
                "Channel": {
                    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                    "Id": 1,
                    "Value": "Facebook"
                },
                "Channel#Id": 1,
                "CellID": "F11"
            }

 

From the above example, it should only return the first record as "eMail" is one of the values from the Compose array.

 

How can I achieve this in power automate to filter get items results?

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Super User
Super User

Hi @Dhruv100322 

 

Here is the output you are looking for?

DamoBird365_0-1652724421824.png

 

You can use filter array, where the channel/value is contained within the array.

 

DamoBird365_1-1652724502676.png
Cheers
Damien

Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts.

View solution in original post

1 REPLY 1
DamoBird365
Super User
Super User

Hi @Dhruv100322 

 

Here is the output you are looking for?

DamoBird365_0-1652724421824.png

 

You can use filter array, where the channel/value is contained within the array.

 

DamoBird365_1-1652724502676.png
Cheers
Damien

Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (4,379)