Pretty new to Node-Red. I know it's probably a rookie mistake causing this, but i can't figure it out.
Trying to set the label of a button based on a global variable (that is being stored in a file). Also wanting to change the value based on input in a change node. for some reason, the change node ignores what comes in. msg.payload gets set on initialization, then want to set variable and change label on button click. Here is a copy of my code.
[{"id":"a167f92c.0edfb8","type":"tab","label":"Dishwasher Schedule","disabled":false,"info":"Keeps track of who has done the dishes last and who's turn it is next"},{"id":"89be00c5.ae132","type":"inject","z":"a167f92c.0edfb8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":100,"wires":[["c6241b0f.5338f8"]]},{"id":"883959c3.6829c8","type":"ui_button","z":"a167f92c.0edfb8","name":"","group":"e46ac3bf.a5102","order":1,"width":0,"height":0,"passthru":false,"label":"Dishwash Task Completed","tooltip":"Click When Finished Unloading and Loading Dishwasher","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":520,"y":160,"wires":[["286b777b.e50488"]]},{"id":"86ea2ea9.3aa1b","type":"ui_text","z":"a167f92c.0edfb8","group":"e46ac3bf.a5102","order":2,"width":0,"height":0,"name":"Up Next","label":"Up Next","format":"{{msg.payload}}","layout":"row-spread","x":900,"y":80,"wires":[]},{"id":"c116e7dd.0779f8","type":"change","z":"a167f92c.0edfb8","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"value1","fromt":"str","to":"value2","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"value2","fromt":"str","to":"value3","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"value3","fromt":"str","to":"value1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":300,"wires":[["cd8af471.2908b8","8a50cedc.bfd43"]]},{"id":"cd8af471.2908b8","type":"debug","z":"a167f92c.0edfb8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":930,"y":400,"wires":[]},{"id":"286b777b.e50488","type":"function","z":"a167f92c.0edfb8","name":"","func":"msg.payload = global.get(\"upnext\",\"storeInFile\");\n\nnode.warn(\"2nd Function Payload: \" + msg.payload)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":410,"y":260,"wires":[["c116e7dd.0779f8"]]},{"id":"c6241b0f.5338f8","type":"function","z":"a167f92c.0edfb8","name":"","func":"msg.payload = global.get(\"upnext\",\"storeInFile\") || \"empty\";\nnode.warn(\"Initial Function: \" + msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":300,"y":100,"wires":[["86ea2ea9.3aa1b","c8e672c3.7f37d","883959c3.6829c8"]]},{"id":"8a50cedc.bfd43","type":"function","z":"a167f92c.0edfb8","name":"","func":"//flow.set(\"upnext\",msg.payload,\"storeInFile\");\nnode.warn(\"3rd Function Payload: \" + global.get(\"upnext\",\"storeInFile\"));\nmsg.payload = global.get(\"upnext\",\"storeInFile\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":960,"y":280,"wires":[["86ea2ea9.3aa1b"]]},{"id":"c8e672c3.7f37d","type":"debug","z":"a167f92c.0edfb8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":460,"y":60,"wires":[]},{"id":"9aa94744.d86908","type":"inject","z":"a167f92c.0edfb8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":600,"wires":[["aff9a723.46ead8"]]},{"id":"aff9a723.46ead8","type":"function","z":"a167f92c.0edfb8","name":"","func":"global.set(\"upnext\",\"value1\",\"storeInFile\");\nmsg.payload = global.get(\"upnext\",\"storeInFile\");\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":420,"y":600,"wires":[["21b70c2a.ae3684"]]},{"id":"21b70c2a.ae3684","type":"debug","z":"a167f92c.0edfb8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":600,"wires":[]},{"id":"e46ac3bf.a5102","type":"ui_group","name":"Schedule","tab":"8a543792.8d4b28","order":1,"disp":true,"width":8,"collapse":false},{"id":"8a543792.8d4b28","type":"ui_tab","name":"Household","icon":"fa-home","order":1,"disabled":false,"hidden":false}]