Well, thanks all....
I have got it working.
I just wanted to check on the validity of the documentation.
Oh, just to add:
[{"id":"31a9067d8b0ac069","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":780,"y":500,"wires":[["fb7426b3870c451a"]]},{"id":"fb7426b3870c451a","type":"change","z":"65c9b63cb09879a0","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"test","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":500,"wires":[["0d935bbe350562b5"]]},{"id":"0d935bbe350562b5","type":"debug","z":"65c9b63cb09879a0","name":"debug 11","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":500,"wires":[]},{"id":"61e1fd3f6a0ed1d1","type":"change","z":"65c9b63cb09879a0","name":"","rules":[{"t":"set","p":"test","pt":"global","to":"20","tot":"num"},{"t":"set","p":"payload","pt":"msg","to":"$globalContext('test') * 2","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":570,"wires":[["f083ffb87d2e9be0"]]},{"id":"5b5b153ff9a3c119","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":780,"y":570,"wires":[["61e1fd3f6a0ed1d1"]]},{"id":"f083ffb87d2e9be0","type":"debug","z":"65c9b63cb09879a0","name":"debug 12","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":570,"wires":[]},{"id":"89eb6a476a8c3345","type":"inject","z":"65c9b63cb09879a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":780,"y":450,"wires":[["71aeac5dd2337c08"]]},{"id":"71aeac5dd2337c08","type":"change","z":"65c9b63cb09879a0","name":"","rules":[{"t":"set","p":"test","pt":"global","to":"44","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":450,"wires":[[]]}]
BOTH of these work. Given I do the first inject
before trying to use the second one the first time around - or..... that global:test
is set.