# Variable number in a flow

**URL:** <https://discourse.nodered.org/t/variable-number-in-a-flow/90051>\
**Category:** General\
**Created:** [8 August 2024 13:12 UTC](https://discourse.nodered.org/t/variable-number-in-a-flow/90051 "2024-08-08T13:12:15Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [8 August 2024 18:21 UTC](https://discourse.nodered.org/t/variable-number-in-a-flow/90051/6 "2024-08-08T18:21:53Z")

</div>

Should work fine. You must be doing something wrong. Hard to say what with no information. Would probably be best to give an example flow.

Have a look at this example

```auto
[{"id":"39ee97df2f51c895","type":"inject","z":"d1395164b4eec73e","name":"incoming temp","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":340,"y":200,"wires":[["c1106d2c5ed7de62"]]},{"id":"c1106d2c5ed7de62","type":"switch","z":"d1395164b4eec73e","name":"","property":"temp_setpoint","propertyType":"flow","rules":[{"t":"lt","v":"payload","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":200,"wires":[["94a2d519aada64c9"],["ba36b9b9e554c9d4"]]},{"id":"94a2d519aada64c9","type":"debug","z":"d1395164b4eec73e","name":"true","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":200,"wires":[]},{"id":"ba36b9b9e554c9d4","type":"debug","z":"d1395164b4eec73e","name":"otherwise","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":240,"wires":[]},{"id":"401acd18ae3f288f","type":"inject","z":"d1395164b4eec73e","name":"another node 20","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":320,"y":120,"wires":[["4ea68427e1e8a0e0"]]},{"id":"5382b5fa4d8cd7f0","type":"inject","z":"d1395164b4eec73e","name":"another node 5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":320,"y":80,"wires":[["4ea68427e1e8a0e0"]]},{"id":"4ea68427e1e8a0e0","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"temp_setpoint","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":80,"wires":[[]]}]

```

[How to import/export a flow](https://nodered.org/docs/user-guide/editor/workspace/import-export)

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

_[View the full topic](https://discourse.nodered.org/t/variable-number-in-a-flow/90051)._
