# numberFormat problems

**URL:** <https://forum.inductiveautomation.com/t/numberformat-problems/35010>\
**Category:** Ignition\
**Created:** [May 25, 2020, 9:53am UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010 "2020-05-25T09:53:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henk](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@Henk](https://forum.inductiveautomation.com/u/Henk)\
**Post date:** [May 25, 2020, 9:53am UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/1 "2020-05-25T09:53:13Z")

</div>

Ignition 8.0.12  
We can not get the numberFormat in a power table working. Also de numberFormat() function is generating errors. Do the have a common issue? Prefix en suffix do work for this cell.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [May 26, 2020, 1:32pm UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/2 "2020-05-26T13:32:34Z")

</div>

Can you post the full error that numberFormat() is generating? Also the number format you’re trying to use would help. Thanks!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 26, 2020, 4:54pm UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/3 "2020-05-26T16:54:07Z")

</div>

[`numberFormat`](https://docs.inductiveautomation.com/display/DOC80/numberFormat) is an expression function - where are you trying to use it on the power table? Extension functions (such as `configureCell`) have to use scripting functions, not expression functions.

---

<div class="post-metadata">

**Author:** ![Henk](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@Henk](https://forum.inductiveautomation.com/u/Henk)\
**Post date:** [May 27, 2020, 6:20am UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/4 "2020-05-27T06:20:00Z")

</div>

This scriptline:

> self.data = system.dataset.setValue(self.data, rij, 'Actueel', numberFormat( qvs[rij].value, '0.##' ) )

results in de following error:

> NameError: global name 'numberFormat' is not defined

---

<div class="post-metadata">

**Author:** ![Henk](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@Henk](https://forum.inductiveautomation.com/u/Henk)\
**Post date:** [May 27, 2020, 6:33am UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/5 "2020-05-27T06:33:16Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c7ad758763a74bd91ecd37cf170d49eb4b09b069.png)

In the last column, with a floating point value, we see all figures behind the point. However, we expected only 2 decimal places.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 27, 2020, 12:24pm UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/6 "2020-05-27T12:24:05Z")

</div>

Paul identified your problem:

> [@paul-griffith](#):
>
> use scripting functions, not expression functions.

You are trying to use an expression function in a script. You must use the python language to format your number, or a script function. See the appendices to the user manual.

---

<div class="post-metadata">

**Author:** ![Henk](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@Henk](https://forum.inductiveautomation.com/u/Henk)\
**Post date:** [May 29, 2020, 5:57am UTC](https://forum.inductiveautomation.com/t/numberformat-problems/35010/7 "2020-05-29T05:57:30Z")

</div>

It is clear to me that I used the wrong function in Python to format a value. Thank you for explaining.  
It just does not explain why the formatting column in a power table does not give the desired result (see picture, last column).
