# How do I remove empty lines from a text block

**URL:** <https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072>\
**Category:** Ask for Help\
**Created:** [June 22, 2023, 8:11pm UTC](https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072 "2023-06-22T20:11:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KPT](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@KPT](https://community.glideapps.com/u/KPT)\
**Post date:** [June 22, 2023, 8:11pm UTC](https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072/1 "2023-06-22T20:11:21Z")

</div>

I have a text block that collect “warnings” incase my user has forgotten something.  
The block is made with a template column that takes a bunch of inputs some IF-Else columns.  
The idea is to have a neat little list of actionable suggestions for the user to act on.

However when certain conditions in is satisfied and no text is shown it leaves a blank line in my list - is there a way to get rid of these blank lines?

I tried the replace text column but that didn’t work, and trim whitespace only trims in the start and end of the text.

 ![Screenshot 2023-06-22 at 21.11.45](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/b/9b8d564dba021474fb7b4d1e1aeec48b451d441f.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 22, 2023, 10:00pm UTC](https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072/2 "2023-06-22T22:00:07Z")

</div>

You could try putting the carriage returns in each IF column result instead of the template column. Then remove the carriage returns from the template column.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 22, 2023, 10:19pm UTC](https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072/3 "2023-06-22T22:19:45Z")

</div>

Or use a Make Array column to combine the ITE columns and then a join text column to join the Array by a carriage return. The Make Array column will ignore blank array values so they’ll never have their own line.

---

<div class="post-metadata">

**Author:** ![KPT](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@KPT](https://community.glideapps.com/u/KPT)\
**Post date:** [June 23, 2023, 12:24pm UTC](https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072/4 "2023-06-23T12:24:22Z")

</div>

Thank you both @Jeff_Hager and @Robert_Petitto.

Went with the array solution and works perfectly.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 24, 2023, 12:24pm UTC](https://community.glideapps.com/t/how-do-i-remove-empty-lines-from-a-text-block/63072/5 "2023-06-24T12:24:43Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
