Can we put seperation ' into numbers?

Hello, i have a quick question, can we put seperation text into a number ? Like number 1 000, i want see 1’000, or 12’000 etc…

Thank you !

Did you try using the native separator via the number column in the data editor?

Yes the native seperation it’s a space between numbers, it’s good but our client want a ’ into numbers.

oh okay, i see…that a bit above my skillset for now but i am confident some of our geniuses on this platform will be able to assist. Just hang in there

Hola @Carter

I suppose your client wants this:

If so, the steps are:

  1. Convert your Number (using the group separator) to Text via a Template column.
  2. Create a new Template column using your previous Template column as source and replace each “.” with an " ’ "

image

This should be enough to make your client happier! :wink:

Saludos!

1 Like

Notice that the column “Number with new format” (with the new separator) should probably only be used for display purposes, not for math.

I’ll quote Mark on this: “The number column is a number. The template column is text. Glide tries its best to parse it as a number, but sometimes it gets it wrong.”

So once a number has gone through the template column, one cannot use the output reliably for math. If you do, check the results carefully. I’ve done a few tests and the results are false with math beyond the template column if the precision in the very first number column is 1 (so set precision to 1.0 or higher). Also, the separator will revert to the usual separator, so really changing the separator should be the very last step before display.

3 Likes

Worth noting that this won’t work for all users in all countries. There are a few different ways to represent a large number. Some countries use commas, some use periods, some use spaces, and some use a combination of all 3.

https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html

This is something that I prefer not to try and mess around with. Just leave it to the user to configure their device so it’s displayed as per their personal preference.

3 Likes

Well, the warning must be:

  • Only to be used for display purposes
  • Only for integer numbers (no decimals)
  • The number has a group separator
  • The group separator can be: “,” or “.” or " "
  • You have to replace each “,” or “.” or " " with " ’ " in your template

can we celebrate the agreement with a :pizza: :pizza:?? :wink:

1 Like

…and beer please :beers: :slight_smile:

1 Like

:point_up_2: I think this is the most important piece of information.

Changing the group separator by hand feels extremely hacky and you are looking for trouble. I wouldn’t do it. It’ll probably break eventually and your client will have much worse to complain about.

1 Like

Thanks all, i think the better option it’s not use it, and for me (switzerland) it’s not working so…

1 Like