web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How i can Filter an Ar...
Power Automate
Answered

How i can Filter an Array using expression inside a Select action

(0) ShareShare
ReportReport
Posted on by 1,950 Season of Giving Solutions 2025
I have this as part of a workflow:-
 
1) I am building an array which contain NetworkID-NetworkTitle
 
2) Then i need to filter the array based on the Array start with ID-
 
3) then to get the NetworkTitle
 
here what i have:-
 
 
 
 
so is there a formula i can use to filter the array based on this formula:-
 
Item Array start with item()?['ID']-
 
and then get the NetworkTitle?
 
Thanks
Categories:
I have the same question (0)
  • Verified answer
    Manish Solanki Profile Picture
    15,169 Moderator on at
    Hi,
     
    You can use xml & xpath functions to achieve this.
     
    Firstly, in array variable you need to store the object instead of plain text as shown below:
    {
    "uniqueid": "<dynamic id value>-<dynamic title value>"
    }
     
    Before select action, add compose action to convert variable in xml format. Use below expression to convert to xml. Expression needs to be entered in the 'Function' window:
    xml(json(concat('{"root":{"items":',variables('NetworksIdTitle'),'}}')))
     
    Finally, to get the title from array variable based on the id use xpath function. Enter the below expression in title map property value to get the required value:
    last(split(xpath(outputs('Compose'), concat('string(//uniqueid[starts-with(text(),"',item()?['ID'],'")]/text())')),'-'))
     
     
     
     
    OUTPUT:
     
     
     
     
    If this helps & solves your problem, please remember to like and accept my solution as it will help others in the future.
     
  • johnjohnPter Profile Picture
    1,950 Season of Giving Solutions 2025 on at
     
    worked very well ,, thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard