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
Microsoft
Microsoft

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
Microsoft
Microsoft

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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,664)