Dashboard TextInput

I just started using Node-Red. I created a dashboard with text input. What is the best way to clear out msg.payload so the 'previous' input string is deleted?

New user! Unable to upload my flow; Sorry!

Thanks

[{"id":"1d054280.ee5b9d","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"b88f1af0.8850f8","type":"debug","z":"1d054280.ee5b9d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":490,"y":340,"wires":[]},{"id":"338c5076.0d4ff","type":"ui_text_input","z":"1d054280.ee5b9d","tab":"c35be409.04d008","mode":"text","delay":"10","name":"Input Text","topic":"","group":"","order":1,"x":440,"y":260,"wires":[["b88f1af0.8850f8"]]},{"id":"7216952.659436c","type":"change","z":"1d054280.ee5b9d","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":200,"wires":[["338c5076.0d4ff"]]},{"id":"fc860530.332518","type":"inject","z":"1d054280.ee5b9d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":200,"wires":[["7216952.659436c"]]},{"id":"c35be409.04d008","type":"ui_tab","z":"1d054280.ee5b9d","name":"MyTab","icon":"dashboard","order":"1"}]

To clear text input, send empty array

[{"id":"c162161.a3a32e8","type":"ui_button","z":"3dd56201.af994e","name":"","group":"5029d507.0459cc","order":1,"width":0,"height":0,"passthru":false,"label":"clear","tooltip":"","color":"","bgcolor":"","icon":"","payload":" []","payloadType":"json","topic":"","x":200,"y":130,"wires":[["f5ae66f8.419758"]]},{"id":"a5b23993.e20938","type":"debug","z":"3dd56201.af994e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":520,"y":130,"wires":[]},{"id":"f5ae66f8.419758","type":"ui_text_input","z":"3dd56201.af994e","name":"Input Text","label":"","tooltip":"","group":"5029d507.0459cc","order":1,"width":"","height":"","passthru":false,"mode":"text","delay":"10","topic":"","x":350,"y":130,"wires":[["a5b23993.e20938"]]},{"id":"5029d507.0459cc","type":"ui_group","z":"","name":"flowtest","tab":"d7adc994.2273a8","order":1,"disp":true,"width":"6","collapse":false},{"id":"d7adc994.2273a8","type":"ui_tab","z":"","name":"Widgets","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Also you probably need to untick msg pass trough option.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.