Problem with generic form

hi everyone, i am novice of node-red.
I have a problem that will surely be foolish for you.
I made a dashboard with a form; in the form where are two text fields.
Every one minute I read data from csv file and I put data in the form.

When I open dashboard the form is enpty and the data appear after a few seconds.
There is a way to show data immediately after opening the dashboard ?

thanks a lot to everyone for help me.

[{"id":"5c60ef52.37d2c","type":"ui_form","z":"d2de92b0.28b4d","name":"","label":"","group":"385aceb0.0c0472","order":1,"width":0,"height":0,"options":[{"label":"field1","value":"field1","type":"text","required":true,"rows":null},{"label":"field2","value":"field2","type":"text","required":true,"rows":null}],"formValue":{"field1":"","field2":""},"payload":"","submit":"ok","cancel":"annulla","topic":"","x":570,"y":300,"wires":[[]]},{"id":"385aceb0.0c0472","type":"ui_group","z":"","name":"","tab":"cd05fbdd.d91348","order":3,"disp":false,"width":"6","collapse":false},{"id":"cd05fbdd.d91348","type":"ui_tab","z":"","name":"test","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

1 possible solution...

On this minute trigger, store the CSV data in flow context then use the ui_control node (it can fire a msg when someone connects) to send the values stored in flow context to your form.

Use the change node to store in flow.xxxx and to get values back out of flow.xxxx

Read the help info for the ui_control on what it sends / when it sends. You'll likely need a filter (a switch node) to filter the desired msg for recognising when a user connects to the dashboard.

1 Like

Perfect!!
it works fine
Thanks so much Steve-Mcl for the solution

1 Like

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