Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Use the Empty in Filter array

(0) ShareShare
ReportReport
Posted on by 164

Dear All,

 

I would like to filter the empty value's item to remain the item"0" that has value, but trial many expression can't achieve, please give me the help, the expression I tried:

empty(outputs('Compose_4')?['0'])
empty(body('Compose_4')?['0'])
empty(items('0'))
empty(item()?['0'])
empty()?['0']


The snapshot from my flow:

empty.png

 

The compose 4 content:

[

  {

    "0": "",  →"filter" to avoid the data that the item "0" has empty value

    "1": "Update by AB",

    "2": "Test01",

    "3": "Test10",

    "4": "Test11",

    "5": "Test12",

    "6": "Test13",

    "7": "Test15",

    "8": "Test10",

    "9": "Test15",

    "10": "Test11"

  },

{

    "0": "title 123",

    "1": "Update by AB",

    "2": "Test06",

    "3": "Test76",

    "4": "Test34",

    "5": "Test43",

    "6": "Test68",

    "7": "Test32",

    "8": "Test86",

    "9": "Test54",

    "10": "Test43"

  },

{

    "0": "title 246",

    "1": "Update by AB",

    "2": "Test11",

    "3": "Test1",

    "4": "Test1",

    "5": "Test2",

    "6": "Test3",

    "7": "Test58",

    "8": "Test02",

    "9": "Test04",

    "10": "Test78"

  }

]

 

I require the result:

 

[

{

    "0": "title 123",

    "1": "Update by AB",

    "2": "Test06",

    "3": "Test76",

    "4": "Test34",

    "5": "Test43",

    "6": "Test68",

    "7": "Test32",

    "8": "Test86",

    "9": "Test54",

    "10": "Test43"

  },

{

    "0": "title 246",

    "1": "Update by AB",

    "2": "Test11",

    "3": "Test1",

    "4": "Test1",

    "5": "Test2",

    "6": "Test3",

    "7": "Test58",

    "8": "Test02",

    "9": "Test04",

    "10": "Test78"

  }

]

 

Regards,

ilu989

  • ilu989 Profile Picture
    164 on at
    Re: Use the Empty in Filter array

    Hi @RezaDorrani @v-alzhan-msft ,

     

    Thanks for your help, it's workable and I found some exception, when the character value has an integer(number), the filter array couldn't recognize, just share what I research, thanks.

     

    [

    {

        "0": 1,   → Integer can't recognize by filiter array

        "1": "Update by AB",

        "2": "Test06",

        "3": "Test76",

        "4": "Test34",

        "5": "Test43",

        "6": "Test68",

        "7": "Test32",

        "8": "Test86",

        "9": "Test54",

        "10": "Test43"

      }

    ]

     

    Regards,

    ilu989

  • v-alzhan-msft Profile Picture
    on at
    Re: Use the Empty in Filter array

    Hi @ilu989 ,

     

    Have you take a try with @RezaDorrani 's solution , the solution is works, you could also refer to screenshot below in the Filter Array action:

    1.png

     

    @equals(empty(item()?['0']), false)

    Please take a try and let me know if your problem could be solved.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • Verified answer
    RezaDorrani Profile Picture
    12,141 on at
    Re: Use the Empty in Filter array

    Hi @ilu989 

     

    empty(item()?['0']) - expression on left of is equal to
    false - expression
    Capture.PNG
     
    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics