Hello guys, i wanted to implement an "if "statement to execute the action once the button is pressed. By referring to my simple code below, other than using msg.payload or msg.topic , is there any other statement i can use to tell the program that the button has been pressed? I tried using " Button.isPressed()" , but it wouldnt work.. any suggestion?
Hi. Thanks for the heads up. The thing is i am using OPC UA to obtain the data and thus my "msg.payload" & "msg.topic" are both occupied with existing data value. And that is why im seeking for other alternative term as to not overwrite the data in the msg.payload and topic.
Hi, sorry for the misunderstanding. The msg.topic contains "variable" values that is generated through the OPC-UA client node. And i would like it to display the data on the MySQL database only when i press the button on the dashboard.
The second image shows the code im trying to implement in the function node after the button node. This is what i meant by both the "msg.topic" and "msg.payload" are pre-occupied with values.
The third image is part of the configuration page of the ui-button node. there is only 2 term here that can be delivered upon button pressed. is there any other term that i can use other than these two?
hi Paul. Ive tried to create another flow(with button,function and debug node) mainly just to trigger the process in another flow. for button,Ive set the payload to be delivered to be a string('yes') when button is pressed.
Image 1 & 2 is the flow and the code respectively. this button on the dashboard, when pressed, it should trigger the process in other flow(shown in image 3 & 4).
The issue here is, i couldnt get the variable reading(image 3) that i have initialised in my other flow(image 1).