# 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:** 10

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [1 August 2024 20:50 UTC](https://discourse.nodered.org/t/first-flow-on-all-my-rpis/88878/10 "2024-08-01T20:50:16Z")

</div>

You can if you use a JSONata expression (I used flow context rather than global)

```auto
$flowContext('formatLabel')(payload, 2, "£ ", ' million')

```

```auto
 [{"id":"a7916d0894793fe5","type":"function","z":"fe7296cf2a5f7fba","name":"Set Flow Variable","func":"const input = msg.payload\n\nflow.set('formatLabel', runtime_str)\n\nmsg.payload = flow.get('formatLabel')(input, 2, \"£ \", \" million\")\n\nreturn msg\n\nfunction runtime_str(number, dp, prefix, suffix) {\n\n return (prefix + number.toFixed(dp) + suffix)\n\n}","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1510,"y":180,"wires":[["0bdc43bf5be7e327"]]},{"id":"3ed0382899737c33","type":"inject","z":"fe7296cf2a5f7fba","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":1270,"y":180,"wires":[["a7916d0894793fe5","e2644336265bfd9e"]]},{"id":"0bdc43bf5be7e327","type":"debug","z":"fe7296cf2a5f7fba","name":"Format Label","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1750,"y":240,"wires":[]},{"id":"e2644336265bfd9e","type":"change","z":"fe7296cf2a5f7fba","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$flowContext('formatLabel')(payload, 2, \"£ \", ' million')","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1500,"y":240,"wires":[["0bdc43bf5be7e327"]]}]

```

Edit: - 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))

---

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