If Else Discards The unit

Please see attached the if else is missing the unit

Yes, this is unfortunately expected behavior because “1” doesn’t follow the same format as “n months”. I agree that it’s a bit frustrating and that the if then else should retain units pulled in from number, math and rollup columns. @Jason

4 Likes

In the meantime, you can try creating a template column to lock in the formatting in between the MATH and the IF columns.

3 Likes

:point_up_2: this

1 Like

Yeah, I reported this last year, and (obviously) it’s still an issue.
Jeff’s workaround is fine, except that sometimes you need to perform further calculations with the output of the if-then-else column, which you can’t (easily) do if it’s outputting a template (string) value. In cases like that, what I normally do is use a second math column after the if-then-else, just for the purpose of re-attaching the units and resetting the precision.

This can all get quite frustrating, especially when working with dates and times.

3 Likes

The workaround Jeff is proposing will work of course but it will be a mass column created for these types of checks as each column should have a template column, when I thought about it already and am already am using it but the time consumption to apply this each time is dramatically painful

Thanks, guys for your advice hope this can be resolved by Glide Team soon

2 Likes

Hola,

My workaround in order to avoid creating new rows and getting the result in one column

image

Option #1: via Javascript

Option #2: via Excel plugin

The only disadvantage is that the result is a text but depending on case, it can be enough.

Saludos!

5 Likes