# First flow on all my RPIs

**URL:** <https://discourse.nodered.org/t/first-flow-on-all-my-rpis/88878>\
**Category:** Share Your Projects\
**Created:** [23 June 2024 12:31 UTC](https://discourse.nodered.org/t/first-flow-on-all-my-rpis/88878 "2024-06-23T12:31:10Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [1 August 2024 21:54 UTC](https://discourse.nodered.org/t/first-flow-on-all-my-rpis/88878/11 "2024-08-01T21:54:36Z")

</div>

That looks promising thanks @Buckskin. Only now there are three different syntaxes to define the function; I need to try and work out if they are actually different or just rewording.

> [@Buckskin](#):
>
> Sorry just realised that this was all covered in another thread ( [Suffix for text output](https://discourse.nodered.org/t/suffix-for-text-output/89879/30))

.  
Well I was reading that thread and I recalled @juntiedt's functions in global context, which is why I came here and asked. (Actually, there I felt like a kid sticking my hand up and being ignored by all the grownups, I'm thoroughly out of my depth)

> [@Suffix for text output](https://discourse.nodered.org/t/suffix-for-text-output/89879/24):
>
> In short, it would mean we may be able to offer support for things like  
> `{{ $filters.formatNumber(payload, { fixed: 2, suffix: ' °C' }) }}`

I think Steve is suggesting this syntax could be made to work within the dashboard widget itself.

Your suggestion of  
`$globalContext('formatLabel')(payload, 2, "£ ", ' million')`  
is slightly less cryptic (no squiggly brackets) and it already works in a change node so no need to modify the dashboard code.  
It has the advantage over doing the formatting entirely in Jsonata `$formatNumber()` that the function is declared once and can be used in many places.  
The downside is you need the extra change node.

---

_[View the full topic](https://discourse.nodered.org/t/first-flow-on-all-my-rpis/88878)._
