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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Filtering an Array created from a Compose Split Action

(0) ShareShare
ReportReport
Posted on by 35
Hi Folks,
 
Not sure what I'm doing wrong, I have a flow that rips the body out of an email to pull relevant information ready to drop into a SharePoint list. 
 
I have the basics mapped out and working as intended, however I am trying to elevate it slightly and remove the last bit of irrelevant guff.

I have a compose action that results in the following output:



I now want to filter that array to only have the rows starting with '[' (The two "Medium" rows displayed above.
 
I have tried Filter Array using item()?['Value'] as the Filter Query, with many variations thereof, however I keep getting an error message that "Value" can't be selected for type String. 

I also tried initializing a variable and setting it with the compose action output, with similar result.
 
I have tried searching the forums and wider with variations on this, with limited success, so I'm wondering if this is even possible. It seems like the compose output array is not being treated as an actual array.
 
Any help will be greatly appreciated.
I have the same question (0)
  • Power Platform 1919 Profile Picture
    1,512 on at
    Filtering an Array created from a Compose Split Action
    Hi @cjbaguley,
    I think it is doable , we can filter the array, 

    can you please share the inputs and outputs (raw outputs)  of the compose action . just to be sure , can you share the power automate expression used,
    it can be helpful , when giving solution


    you can check this article :
    Extract information from an email with Power Automate
  • Verified answer
    DeveloperAK Profile Picture
    88 on at
    Filtering an Array created from a Compose Split Action
    Hello @cjbaguley
     
    It looks like the issue is simply that the output from your Compose isn’t an array of objects – it’s an array of strings.

    Because of that, Power Automate won’t let you use expressions like item()?['Value'], since each item is already just a string and doesn’t contain any properties.
     
    How to filter only the rows starting with "[". 
     

    In your Filter array action:

    From:

    outputs('Compose') (or whatever your compose step is called)

    Condition:

    Use an expression:

    startsWith(item(), '[')
    
    item() returns the current string in the array, so startsWith() works directly on it.
    
    
    📩 Need more help? Mention @DeveloperAK anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping
     
  • cjbaguley Profile Picture
    35 on at
    Filtering an Array created from a Compose Split Action
    Perfect!! 

    Thank you so much for the detailed reply, it really helped me understand the different types of arrays. 
     
    When I put the expression item() into the filter query field, it initially formatted it as "Email Attachment Item", but then on saving and running, changed it to "Current Item" as below, this was the final "aha" moment for my brain to get around it:
     


    Giving me the result I needed:



    Thanks again for sharing your knowledge and expertise!!!

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 493 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 246 Most Valuable Professional

Last 30 days Overall leaderboard