Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Removing Array variable if it is empty

I have a series of Arrays that I am creating and adding into a compose to get them showing in a line by line basis. On occasions though some of my Arrays are empty and if this is the case I am getting a blank line. Is there any way to remove this blank line altogether if the Array is empty?


Image 1 is my edit flow part where I list all my Arrays and image 2 is the output of the run where I have blank values.






Super User
Super User

@sammybridge - Why do you want to remove [] ? Are you intending to use it as string somewhere? can you please explain requirement?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

I have a series of arrays and I need each one to be on a new separate line. This then gets turned into a txt file and integrated into another system. I can’t have any blank lines in the document when it gets sent over to them which is why when any of my arrays are empty, I need to delete the blank space

What is the source of these arrays? Where is the array data coming from? Can you run a loop on that source?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,210)