Hello , I want to take user input through text box and then write this data in the file using button. .So basically after taking user input , i store it in the function node What i want to do is , after clicking the button the data should get stored in the file. I am able to write the data in the file without using the button.I have added the button in the flow but when i click the button i get d7360f0c.781c2 in the file. I don't know why is this happening . Am i missing something in the flow ? Please let me know.
I have also read some solutions related to this issue on this forum but i couldn't find proper solution. The link i have referred : Send value of input text when click on button.
My Flow:
[{"id":"224894f3.ecbecc","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"ea233531.023898","type":"function","z":"224894f3.ecbecc","name":"take data","func":"//var d = new Date();\n//var t = d.getTime();\ncontext.data = context.data || {}\nvar data = context.data.task1 \n// context.data.task1 = parseInt(msg.payload);\ncontext.data.task1 = String(msg.payload);\n//payload = {\"time\":t,\"payload\":msg.payload,\"topic\":msg.topic};\n//msg.payload = payload;\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":400,"wires":[["4e640aac.7ba404","c8f82b90.a25518","ec646cd8.2e673"]]},{"id":"4e640aac.7ba404","type":"json","z":"224894f3.ecbecc","name":"","property":"payload","action":"str","pretty":false,"x":430,"y":280,"wires":[["485cefd8.eea7f"]]},{"id":"485cefd8.eea7f","type":"file","z":"224894f3.ecbecc","name":"","filename":"C:\\Users\\vishakha\\Desktop\\Node Red\\hi","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":680,"y":360,"wires":[[]]},{"id":"4891629e.0a785c","type":"ui_text_input","z":"224894f3.ecbecc","name":"Enter Product Key ","label":"Product Key","tooltip":"","group":"f1a2366f.a829f8","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":"0","topic":"task1","x":130,"y":180,"wires":[["ea233531.023898"]]},{"id":"c8f82b90.a25518","type":"ui_button","z":"224894f3.ecbecc","name":"","group":"f1a2366f.a829f8","order":2,"width":0,"height":0,"passthru":false,"label":"Enter ","tooltip":"","color":"","bgcolor":"Red","icon":"","payload":"msg","payloadType":"str","topic":"","x":450,"y":500,"wires":[[]]},{"id":"ec646cd8.2e673","type":"debug","z":"224894f3.ecbecc","name":"Take Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":410,"y":580,"wires":[]},{"id":"f1a2366f.a829f8","type":"ui_group","z":"","name":"Enter Product Key ","tab":"3e42440f.5b487c","disp":true,"width":"6","collapse":false},{"id":"3e42440f.5b487c","type":"ui_tab","z":"","name":"Relay Board Page 1","icon":"dashboard","order":2,"disabled":false,"hidden":false}]