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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter empty values fr...
Power Automate
Unanswered

Filter empty values from get items to array

(0) ShareShare
ReportReport
Posted on by 180

Hi everyone,

 

I'm having trouble filtering Sharepoint records with using a filter array action. I can't filter the SharePoint items directly, because I need the full results for another part of my flow, so I want to filter the results with a filter array action. It seems quite straight forward, but I get a body type from my Parse JSON action instead of an array.

 

This is the first part of the flow:

JOAS_Niels_0-1702629892253.png

 

I used the output of the Filter array action to generate a schema. for the Parse JSON action

 

JOAS_Niels_1-1702629991220.png

 

I then want to append my array with the results, but I get this error:

 

Unable to process template language expressions in action 'Parse_JSON' inputs at line '0' and column '0': 'The template language expression 'outputs('Filter_array')['body/value']' cannot be evaluated because property 'body/value' doesn't exist, available properties are 'body'. Please see https://aka.ms/logicexpressions for usage details.'.

 

I can only put a Body as input for the "For each".

JOAS_Niels_2-1702630141778.png

 

Output Filter Array:

Spoiler (Highlight to read)
JOAS_Niels_3-1702630332057.png

 

 

Can you help me figuring out what I'm missing here, please?

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    OK, I think I've got this figured out.  In the array output of the Get items there is a field called 

    "@odata.etag":  with a value that looks like this: "\"1\"", If you look close at that value it translates to a value of "1". Its a string embedded in a string using escaped quotes. My theory is that that field value is causing the Parse JSON to fail. I was able to reproduce your issue when I used the full get items array as input for the parse JSON.
     
    The solution was to do a Data Select of the fields I wanted in my output and not include the @OData.etag. Unfortunately that meant I needed to do another Parse JSON before the filter array so I could use the fields for filtering. but once I did that it all worked as expected.
    image.png
  • JOAS_Niels Profile Picture
    180 on at

    @Pstork1 wrote:

    OK, I think I've got this figured out.  In the array output of the Get items there is a field called 

    "@odata.etag":  with a value that looks like this: "\"1\"", If you look close at that value it translates to a value of "1". Its a string embedded in a string using escaped quotes. My theory is that that field value is causing the Parse JSON to fail. I was able to reproduce your issue when I used the full get items array as input for the parse JSON.
     
    The solution was to do a Data Select of the fields I wanted in my output and not include the @OData.etag. Unfortunately that meant I needed to do another Parse JSON before the filter array so I could use the fields for filtering. but once I did that it all worked as expected.
    image.png

    That seems very plausible, but I still get a body as output. This is driving me nuts.

     

    This is my Select action:

    JOAS_Niels_1-1702888825853.png

     

    This is the result of my Select action:

    JOAS_Niels_0-1702888789753.png

    This is my Parse action:

    JOAS_Niels_2-1702888944532.png

    Am I doing something wrong? I used the output of the select as schema for my Parse action.

     

  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @JOAS_Niels 

     

    It's a bug.  The new designer is giving you a dynamic value that doesn't exist.  You want body('filter_array') which is visible on the classic designer but not on the new designer.  See here https://www.youtube.com/watch?v=4IphRdADJBc&t=457s


    Cheers
    Damien

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

  • JOAS_Niels Profile Picture
    180 on at

    @DamoBird365 wrote:

    Hi @JOAS_Niels 

     

    It's a bug.  The new designer is giving you a dynamic value that doesn't exist.  You want body('filter_array') which is visible on the classic designer but not on the new designer.  See here https://www.youtube.com/watch?v=4IphRdADJBc&t=457s


    Cheers
    Damien

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


    Thanks, @DamoBird365! That helped to resolve the issue. I couldn't get it to work with a Parse JSON action in between, but I managed to get it to work without it.

  • Syzmik Profile Picture
    5 on at

    This needs to made more common knowledge. Spent hours looking through support pages and this comment here is what resolved it for me. Thank you

  • CM24 Profile Picture
    on at

    I had this exact same issue.  I was banging my head on the desk in frustration.

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard