Formating a numeric field

Hi everyone,
I'm trying to format a number to be displayed in a particular format and can't see how to achieve that.

I've looked at All About the Built-In AngularJS Filters ― Scotch.io as referred to in the help section.

Using the dashboard text node "Value format" field, and using {{value | number:1}} hPa which gives the result "1,012.8 hPa" which is correct.

However, the result I want is "1012.8 hPa" which is without the 1000 separation comma.

I know I could convert it to a text field etc. However I am wanting to achieve this by applying some sort of mask eg "9999.9" or "####.#".

I have tried all sorts and am stuck. Does anyone know where can I find more documentation or has anyone have any knowledge please?

Cheers.
Paul.

Put a debug node on the output of the node feeding the ui-text node to show what the data type actually is.i.e.is it a numbr or a string that is comong in (I suspect it is a string)

Hi zenofmud,
It's a number.
image

Cheers.
Paul.

Sorry for taking so long to get back to you.
I did a google search ‘ javascript number to string with mask’ and found several possible solutions. You should check some out

Hi zenofmud,
Thanks for your reply.
I sorted it by formatting the value before sending it to be displayed.
It's not the way I wanted to do it, but it'll do.

Cheers.
Paul.