Variable number in a flow

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

[{"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

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 ```)

``` 
   code goes here 
```

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

See this post for more details - How to share code or flow json