Dear Node-Red´s
I do have a problem to hand off informations only if a "Store" button is pressed. My flow looks like this:
[{"id":"46f3fadcb97268ab","type":"ui_button","z":"84622180359efd62","name":"Speichern","group":"7763f99169395494","order":13,"width":0,"height":0,"passthru":true,"label":"Speichern/store","tooltip":"Speichert die Daten in der Datenbank","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"payload","topicType":"msg","x":560,"y":880,"wires":[["56df29454df9d063"]]},{"id":"56df29454df9d063","type":"trigger","z":"84622180359efd62","name":"","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"1","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":800,"y":880,"wires":[["98e21e25054d9623"]]},{"id":"0e353c3e8a65bd44","type":"inject","z":"84622180359efd62","name":"Store","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":360,"y":880,"wires":[["46f3fadcb97268ab"]]},{"id":"9790e28241b2bd8d","type":"debug","z":"84622180359efd62","name":"store (true/false)","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1320,"y":880,"wires":},{"id":"98e21e25054d9623","type":"function","z":"84622180359efd62","name":"speichern","func":"var e=msg.payload;\nglobal.set("speichern", e) ; //Input in Variable speichern \nmsg.payload =e,"Speichern";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":1040,"y":880,"wires":[["9790e28241b2bd8d"]]},{"id":"138ea281f71d60a5","type":"function","z":"84622180359efd62","name":"Transfer info after "Speichern" is pressed","func":"// This node should send the input thrue if speichern is true \n\nif (global.get("speichern")==true) {\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":1040,"y":680,"wires":[["9a2743aac464f89e"]]},{"id":"9a2743aac464f89e","type":"debug","z":"84622180359efd62","name":"Speichern","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1320,"y":680,"wires":},{"id":"4858a82a295aa484","type":"ui_dropdown","z":"84622180359efd62","name":"Test input","label":"Test input","tooltip":"","place":"0","group":"7763f99169395494","order":6,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"0,0","value":"0,0","type":"str"},{"label":"0,1","value":"0,1","type":"str"},{"label":"0,5","value":"0,5","type":"str"},{"label":"1,0","value":"1,0","type":"str"},{"label":"5,0","value":"5,0","type":"str"}],"payload":"","topic":"Test","topicType":"str","x":520,"y":680,"wires":[["10a88fb2008e0ae3","138ea281f71d60a5"]]},{"id":"344c311e7f9cadfd","type":"inject","z":"84622180359efd62","name":"1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Pruefdruck","payload":"1,0","payloadType":"str","x":350,"y":720,"wires":[["4858a82a295aa484"]]},{"id":"1cc030a74f89eae7","type":"inject","z":"84622180359efd62","name":"5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Pruefdruck","payload":"5,0","payloadType":"str","x":350,"y":760,"wires":[["4858a82a295aa484"]]},{"id":"06fbd0626802fa7a","type":"inject","z":"84622180359efd62","name":"0,5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Pruefdruck","payload":"0,5","payloadType":"str","x":350,"y":680,"wires":[["4858a82a295aa484"]]},{"id":"0b10235f72d3629c","type":"inject","z":"84622180359efd62","name":"0,1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Pruefdruck","payload":"0,1","payloadType":"str","x":350,"y":640,"wires":[["4858a82a295aa484"]]},{"id":"ec246cd684064818","type":"inject","z":"84622180359efd62","name":"0,0","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Pruefdruck","payload":"0,0","payloadType":"str","x":350,"y":600,"wires":[["4858a82a295aa484"]]},{"id":"10a88fb2008e0ae3","type":"debug","z":"84622180359efd62","name":"Choice","active":false,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":730,"y":640,"wires":},{"id":"45894a54ee438d43","type":"comment","z":"84622180359efd62","name":"Create a Variable to serve the "Store" information to all nodes","info":"","x":490,"y":840,"wires":},{"id":"30687fc843b5dfb4","type":"comment","z":"84622180359efd62","name":"Input","info":"","x":510,"y":600,"wires":},{"id":"9502cb7ba3de449d","type":"comment","z":"84622180359efd62","name":"Function which should transfer informations if store== true ","info":"","x":1050,"y":640,"wires":},{"id":"3ecf675016fdfbf3","type":"comment","z":"84622180359efd62","name":"Problem: This Button needs a Trigger (new Information) but the Information is alread at the input","info":"","x":1160,"y":720,"wires":},{"id":"7763f99169395494","type":"ui_group","name":"Group 1","tab":"dde642b08fea7c32","order":1,"disp":true,"width":6},{"id":"dde642b08fea7c32","type":"ui_tab","name":"Test","icon":"dashboard","order":8,"disabled":false,"hidden":false}]
Please can you help.
Thanks in advance Clemens