# Filter an Array using Formula inside a Select action 

**URL:** <https://forum.dimagi.com/t/filter-an-array-using-formula-inside-a-select-action/11486>\
**Category:** Developers\
**Created:** [January 13, 2025, 11:24am UTC](https://forum.dimagi.com/t/filter-an-array-using-formula-inside-a-select-action/11486 "2025-01-13T11:24:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnjohn123](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@johnjohn123](https://forum.dimagi.com/u/johnjohn123)\
**Post date:** [January 13, 2025, 11:24am UTC](https://forum.dimagi.com/t/filter-an-array-using-formula-inside-a-select-action/11486/1 "2025-01-13T11:24:18Z")

</div>

Inside Power Automate flow if i have a variable of type Array that stores ID-Title, as follow:-

**[  
"5-Open",  
"9-Closed",  
"3-With"  
]**

Now inside a Select action, which allow me to access the ID of a collection using:-

**item()?['ID']**

How i can get the title of the array item using the **item()?['ID']**? In other words how i can filter the array using formula? Can i benefit from XPath?

Thanks

---

<div class="post-metadata">

**Author:** ![Mazz](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/mazz/32/1004_2.png) [@Mazz](https://forum.dimagi.com/u/Mazz)\
**Post date:** [January 13, 2025, 11:46am UTC](https://forum.dimagi.com/t/filter-an-array-using-formula-inside-a-select-action/11486/2 "2025-01-13T11:46:12Z")

</div>

It's more of a power automate question than CommCare.

I haven't playe dmuch with this but I know that you can tell power platform that the data received is in XML. I think it's "parse XML" or something.  
then you should be able to query but I am not sure about any of this

I just know that this is a power automate question
