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 / Remove blank items fro...
Power Automate
Suggested Answer

Remove blank items from array

(0) ShareShare
ReportReport
Posted on by 595
May i know how to remove the blank item from the array? I used below code but it doesn't work.
 
@and(equals(item(), items('Apply_to_each_3')),equals(empty(item()), false))
 
I have the same question (0)
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at
     
     
    It should be able to help you out.
     

    If this solved your problem, please mark it as Solved to help others find the solution faster.
    If you found it helpful, consider giving it a Like to support each other in this community!

    Thanks, and happy building!

  • Suggested answer
    11manish Profile Picture
    1,048 on at
    You’re very close  — the issue is mainly with how the condition is written in Microsoft Power Automate.
     
    Problem in your expression
    • @and(equals(item(), items('Apply_to_each_3')),equals(empty(item()), false))
    Issues:
    • equals(item(), items(...)) → unnecessary for blank check
    • equals(empty(item()), false) → overly complex
    • Not actually filtering blanks properly
    Correct way to remove blank items
    Simple and correct expression
    Use this:
    • @not(empty(item()))
    This will:
    • Remove null
    • Remove "" (empty string)
    If you want to be stricter (recommended)
    Sometimes items contain spaces " " → not technically empty
    Use:
    • @not(empty(trim(item())))
    This removes:
    • null
    • empty
    • whitespace-only values
    If using Filter Array action
    Condition:
    • @not(empty(trim(item())))
    Example
    Input:

    ["A", "", "B", null, "   ", "C"]

    Output:

    ["A", "B", "C"]

    Thanks
    Manish
     
     
  • Suggested answer
    Kalathiya Profile Picture
    1,696 Super User 2026 Season 1 on at
     
    Yes, you can use filter array to exclude the blank items from the array.
     
    For example
    1. Sample Array then your format like this
     
    You can use item() directly when working with a simple array (no columns), because each element is just a value.
     
    2. If you have array of objects then expression like this: 
     

    Now each item() is an object, So you must refer to the column like this:

    item()?['Name']

    Name - Replace with your column name

     

    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

     
  • Kalathiya Profile Picture
    1,696 Super User 2026 Season 1 on at

    If this solution helped, please consider marking it as the verified answer so it can help others in the community 😊
    If you still need assistance, feel free to let us know, we’re happy to help!

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard