# Space instead of Comma in NumberFormat

**URL:** <https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 14, 2024, 9:58am UTC](https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674 "2024-02-14T09:58:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiri\_Pise](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Jiri\_Pise](https://forum.inductiveautomation.com/u/Jiri_Pise)\
**Post date:** [February 14, 2024, 9:58am UTC](https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674/1 "2024-02-14T09:58:22Z")

</div>

Hello,

is there a way to have this format but with space instead of comma? (It is in the column definition on table)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/b/eb1507e1ea15d802125cc8b10d680bf9e1cd9a1e.png) ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/70db2acb38867adc726f30a1fa817a45d9b066da.png)

None of these works  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/028fd7f2bb34c252dd7c23418061461386002aec.png)

I know I can manually type the format there but it doesnt work the way I expected. Am I missing something?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/a/2a010f5f3b561f6256d5991623fe2d27602064eb.png) ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/3/632584f149d49277d350111f04f9a3da96137c96.png)

The only way I was able to walk around it is by creating a Script to change number to string with spaces but I donť think it is the best practice.

Thank you for help.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 14, 2024, 10:10am UTC](https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674/2 "2024-02-14T10:10:16Z")

</div>

If I'm not mistaken, the number formatting in the perspective table uses [Numeral.js](http://numeraljs.com).  
I'd start by checking there if there's a way to do this, but I'm afraid there is not.

edit: There's a way to register custom formats, but it requires running javascript. So I guess you could find a way to inject js to run this... but it's probably not better than running your own formatting script - except for the fact that your column now contains strings and it messes up sorting.  
Or make a custom module to register new formats.

edit again: I can't remember where I found this numeral.js thing... looking for it now, I find references to this instead: [DecimalFormat (Java SE 11 & JDK 11 )](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/DecimalFormat.html)

> Number formatting in Ignition is largely driven by Java's DecimalFormat class. See the [DecimalFormat documentation](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/DecimalFormat.html) for more information.

So I'm not sure about anything.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2024, 10:32am UTC](https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674/3 "2024-02-14T10:32:17Z")

</div>

The , is just a standin for the **delimitor** , it doesnt litterly mean ','  
The delimitor should be defined by the locale

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 14, 2024, 10:36am UTC](https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674/4 "2024-02-14T10:36:33Z")

</div>

But what if you don't want your locale's default separator ?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 14, 2024, 10:37am UTC](https://forum.inductiveautomation.com/t/space-instead-of-comma-in-numberformat/85674/5 "2024-02-14T10:37:55Z")

</div>

Then you use strings i guess 🤷‍♂️
