# ITE must leave white space?

**URL:** <https://community.glideapps.com/t/ite-must-leave-white-space/43090>\
**Category:** Ask for Help\
**Created:** [June 15, 2022, 9:46am UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090 "2022-06-15T09:46:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [June 15, 2022, 9:46am UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/1 "2022-06-15T09:46:16Z")

</div>

Hi,  
When using ITE I sometimes want it to return an empty string. However, when leaving the “THEN” field empty, it return a white space (" “) and not blank (”").  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/1/d11e10a19fa09d9348e31239ee778d70f632836e.png)

I later use the result of this ITE inside a template. If the ITE is at the start or end of the template, these white spaces are easily removed with trim. When the ITE is in the middle, it creates an unneseccery white space. Can we avoid it? Can we remove it after it’s in the template? It’s not always possible to search for double spaces (one from the ITE and another that we left in the template to begin with).  
Ideas?  
Thanks

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 15, 2022, 10:27am UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/2 "2022-06-15T10:27:55Z")

</div>

> [@Test\_Test](#):
>
> However, when leaving the “THEN” field empty, it return a white space (" “) and not blank (”").

Are you sure?  
I just did a quick test, and that’s not what I get (nor is it what I would expect).  
Are you 100% sure that the extra whitespace isn’t creeping in somewhere else?  
If you can reliably replicate this, I would consider it a bug.

---

<div class="post-metadata">

**Author:** ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)\
**Post date:** [June 15, 2022, 11:38am UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/3 "2022-06-15T11:38:32Z")

</div>

@Test_Test  
In case you cannot remove it!  
Use trim after the ITE and then use it elsewhere!

Thats the easiest bypass!

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [June 15, 2022, 12:29pm UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/4 "2022-06-15T12:29:49Z")

</div>

> [@Darren\_Murphy](#):
>
> Are you sure?

Well, no 😆

> [@Darren\_Murphy](#):
>
> Are you 100% sure that the extra whitespace isn’t creeping in somewhere else?

Well, no 😆

It was my template that was wrong.  
What I needed to do is to leave no whitespace between two variables. Then, in those variables, add white space at the start and/or end of the string.

Sorry, only when I reach out to the community do I finally see the error of my ways.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 15, 2022, 4:09pm UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/5 "2022-06-15T16:09:48Z")

</div>

> [@Test\_Test](#):
>
> Sorry, only when I reach out to the community do I finally see the error of my ways.

Don’t feel bad, I’ve been there more times than I can count 😉😂

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [June 15, 2022, 4:28pm UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/6 "2022-06-15T16:28:50Z")

</div>

No problem, I have had this issue before too.

The last one was when I used a Joined List column, by default it puts a comma as separator but if you pay attention what is happening you will see that the separator has an additional space: “, “ (a comma + whitespace”… 🤬

Later, if you want to create relations or find items in an array, the results are always empty due to that whitespace.

Saludos

---

<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 16, 2022, 4:29pm UTC](https://community.glideapps.com/t/ite-must-leave-white-space/43090/7 "2022-06-16T16:29:33Z")

</div>

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