# IF-THEN-ELSE Column does not keep the numeric formating

**URL:** <https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750>\
**Category:** Report a Bug\
**Created:** [August 26, 2020, 5:22pm UTC](https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750 "2020-08-26T17:22:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gui\_Rodrigues\_Goncal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gui_rodrigues_goncal/32/41584_2.png) [@Gui\_Rodrigues\_Goncal](https://community.glideapps.com/u/Gui_Rodrigues_Goncal)\
**Post date:** [August 26, 2020, 5:22pm UTC](https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750/1 "2020-08-26T17:22:47Z")

</div>

My app’s URL: [https://curly-laborer-0521.glideapp.io/](https://curly-laborer-0521.glideapp.io/)

Hello comunnity. Maybe someone can help me on this:

I have 2 numeric columns (Debit and Credit). I have formated both for currency, including a Plus sign or a Minus sign.  
When I use a If-then-else column to display one of them, the Data Editor looses the formating.

Check the video, please.

---

<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:** [August 26, 2020, 5:39pm UTC](https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750/2 "2020-08-26T17:39:56Z")

</div>

In those cases I usually create a template column filled with the value from a numeric or math or date column to “lock in” the formatting. Then you can use the template column in the IF/THEN and the value will stick. In your case you may be able to shortcut this. Create a template column and fill it with the letters ‘CD’. Set the replacement value of C to the credit column and the replacement value of D to the debit column. This might work without the need of an If Then column.

---

<div class="post-metadata">

**Author:** ![Gui\_Rodrigues\_Goncal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gui_rodrigues_goncal/32/41584_2.png) [@Gui\_Rodrigues\_Goncal](https://community.glideapps.com/u/Gui_Rodrigues_Goncal)\
**Post date:** [August 26, 2020, 7:10pm UTC](https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750/3 "2020-08-26T19:10:47Z")

</div>

Jeff,  
Thanks for the quick response and the template tip.  
In fact, the template column, using “CD”, resolves the issue.

But, in reality, there is a bug in the resolution of the if-then-else column, isn’t there?

---

<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:** [August 26, 2020, 7:22pm UTC](https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750/4 "2020-08-26T19:22:21Z")

</div>

That’s debatable I guess. In most cases, yes I’d prefer if we didn’t have to do the template trick, but I can also understand if you have a situation where you would want to show the result of each step of a complex calculation, but only display a rounded or formatted value on the screen. Take pi for example. You might want to only display 3.14, but your calculations still need to use 3.14159265359. I think 3.14 is easier on the eyes if you are displaying it on the screen

I can see it both ways, but I’m glad I at least have the option to either use a template as a workaround or not.

---

<div class="post-metadata">

**Author:** ![Gui\_Rodrigues\_Goncal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gui_rodrigues_goncal/32/41584_2.png) [@Gui\_Rodrigues\_Goncal](https://community.glideapps.com/u/Gui_Rodrigues_Goncal)\
**Post date:** [August 26, 2020, 8:04pm UTC](https://community.glideapps.com/t/if-then-else-column-does-not-keep-the-numeric-formating/14750/5 "2020-08-26T20:04:25Z")

</div>

Understood. 🙂Thank you.
