I am moving from Dashboard to uibuilder for the user interface. Now I need to replace my Dashboard button with uibuilder button. So that it can continue to trigger my other nodes connected to the dashboard button.
My example Flow:
[{"id":"f3c48170.d695b8","type":"ui_text","z":"1222844e.dd0a4c","group":"27877987.9558de","order":1,"width":0,"height":0,"name":"","label":"Card Remaining","format":"{{msg.payload}}","layout":"row-spread","x":420,"y":2260,"wires":[]},{"id":"95bb4648.968fa8","type":"ui_text_input","z":"1222844e.dd0a4c","name":"","label":"Please enter RFID card no:","tooltip":"","group":"27877987.9558de","order":2,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"sensor_data","x":1180,"y":2340,"wires":[[]]},{"id":"574f75d4.c327cc","type":"function","z":"1222844e.dd0a4c","name":"Switching","func":"//var x = flow.get('card_required');\nvar counter_m = msg.payload;\n counter_m = counter_m- 1;\n if(counter_m < 0){\n msg.payload = counter_m;\n }\n\nmsg.payload = counter_m;\nflow.set('counter_m',msg.payload);\nvar i=1;\nflow.set('tempOP',i);\nreturn msg;\n\n","outputs":1,"noerr":0,"x":520,"y":2160,"wires":[["dddbd1ac.3232b"]]},{"id":"5c75f0a8.4b7918","type":"switch","z":"1222844e.dd0a4c","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"lte","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":2320,"wires":[["f3c48170.d695b8","574f75d4.c327cc","ba9c8d7d.ced4d"],["2a0f247c.b70b84"]]},{"id":"dddbd1ac.3232b","type":"ui_button","z":"1222844e.dd0a4c","name":"","group":"27877987.9558de","order":0,"width":0,"height":0,"passthru":false,"label":"Card Submit ","tooltip":"","color":"","bgcolor":"","icon":"","payload":"counter_m","payloadType":"flow","topic":"","x":730,"y":2160,"wires":[["5c75f0a8.4b7918","fc1235ed.20cdd8"]]},{"id":"2a0f247c.b70b84","type":"change","z":"1222844e.dd0a4c","name":"","rules":[{"t":"set","p":"enabled","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":2380,"wires":[["dddbd1ac.3232b"]]},{"id":"246107d4.346468","type":"change","z":"1222844e.dd0a4c","name":"","rules":[{"t":"set","p":"enabled","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":2100,"wires":[["dddbd1ac.3232b"]]},{"id":"ba9c8d7d.ced4d","type":"function","z":"1222844e.dd0a4c","name":"","func":"var counter = flow.get('counter_m');\nvar card= msg.payload;\nflow.set('card_number',card);\n msg.payload = card;\nreturn msg;\n\n","outputs":1,"noerr":0,"x":990,"y":2340,"wires":[["95bb4648.968fa8"]]},{"id":"88b8febc.f7096","type":"function","z":"1222844e.dd0a4c","name":"Quantity Count","func":"flow.set('card_required_m',msg.payload);\nreturn msg;\n","outputs":1,"noerr":0,"x":280,"y":2160,"wires":[["f3c48170.d695b8","246107d4.346468","574f75d4.c327cc"]]},{"id":"10325ecf.b03a59","type":"mqtt in","z":"1222844e.dd0a4c","name":"","topic":"totalrfid/medium","qos":"2","datatype":"auto","broker":"f98a1211.7bb178","x":100,"y":2160,"wires":[["88b8febc.f7096"]]},{"id":"dfd0e046.9a063","type":"mqtt in","z":"1222844e.dd0a4c","name":"","topic":"operatorETS/CardNo","qos":"2","datatype":"auto","broker":"f98a1211.7bb178","x":800,"y":2260,"wires":[["ba9c8d7d.ced4d"]]},{"id":"5af0b8fa.0f5778","type":"mysql","z":"1222844e.dd0a4c","mydb":"47c5bd75.739af4","name":"MYSQL","x":1460,"y":2180,"wires":[["54e272fa.1a82dc"]]},{"id":"54e272fa.1a82dc","type":"debug","z":"1222844e.dd0a4c","name":"","active":true,"console":"false","complete":"false","x":1610,"y":2180,"wires":[]},{"id":"7ece52e2.3a719c","type":"function","z":"1222844e.dd0a4c","name":"tbl_ets_demo_process","func":"\nvar A = flow.get('tempOP');\nvar B = flow.get('operatorETSCardNo');\nvar C = flow.get('Order_ID');\nvar D = flow.get('Bsize');\n \nvar newMsg = {\n \"topic\": \"INSERT INTO tbl_ets_demo_process (`OperationID`,`CardNo`,`SampleRefNo`,`CardQty`) VALUES ( \" + A + \",\" + B + \", \" + C + \",\" + D + \")\"\n}\nA = A+1;\nflow.set('tempOP',A);\nreturn [newMsg];\n//INSERT INTO `processed_input`(`order_id`, `total_small_size`, ` total_medium_size`, ` total_large_size`, ` total_xl_size`, `small_card_qty`, `medium_card_qty`, `large_card_qty`, `xl_card_qty`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9])\n\n//INSERT INTO `operator_input`(`order_id`, `buyer_name`, `color`, `small_size`, `medium_size`, `large_size`, `xl_size`, `no_of_ply`, `bundle_size`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9])","outputs":1,"noerr":0,"x":1280,"y":2180,"wires":[["5af0b8fa.0f5778"]]},{"id":"b7a5643.a14c498","type":"while-loop","z":"1222844e.dd0a4c","name":"while-loop","condi":"msg.payload > 0","x":1040,"y":2160,"wires":[["1c28f3c4.9d330c"],["1e616e9.a26b091","7ece52e2.3a719c"]]},{"id":"1e616e9.a26b091","type":"change","z":"1222844e.dd0a4c","name":"msg.payload--","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(msg.payload) -1","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":2240,"wires":[["b7a5643.a14c498"]]},{"id":"fc1235ed.20cdd8","type":"function","z":"1222844e.dd0a4c","name":"","func":"\nvar card=flow.get('opID');\nmsg.payload = card;\n\nreturn [msg];\n","outputs":1,"noerr":0,"x":890,"y":2160,"wires":[["b7a5643.a14c498"]]},{"id":"1c28f3c4.9d330c","type":"function","z":"1222844e.dd0a4c","name":"Count Reset","func":"\nvar A = flow.get('tempOP');\nA = 1;\nflow.set('tempOP',A);\nmsg.payload = A;\n\nreturn msg;\n","outputs":1,"noerr":0,"x":1250,"y":2140,"wires":[["5dda7b7c.63c014"]]},{"id":"5dda7b7c.63c014","type":"debug","z":"1222844e.dd0a4c","name":"","active":false,"console":"false","complete":"false","x":1450,"y":2120,"wires":[]},{"id":"27877987.9558de","type":"ui_group","z":"","name":"Medium Size","tab":"2fb75c1d.35a72c","order":6,"disp":true,"width":"6","collapse":false},{"id":"f98a1211.7bb178","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"47c5bd75.739af4","type":"MySQLdatabase","z":"","host":"localhost","port":"3306","db":"etsiot","tz":""},{"id":"2fb75c1d.35a72c","type":"ui_tab","z":"","name":"Issue Card","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
uibuilder interface:
I am getting different values from different button press:
Thanks in advance.