Changeable multidimensional array

Hi,
is it possible to show an multidimensional array and update this with the dashboard ui?

Can you help pls?

I try to get an multidimensional array into dashboard(the whole array has 1000 arrays), this is the first problem:


alarmtexte=[["000",0,0,20000,"Phase fehlt"],
["001",0,0,20000,"Steuerspannung Stoerung"],
["002",0,0,20000,"Not Aus"],
["003",0,0,20000,"24V Stoerung"],
["004",0,0,20000," Batterie MIN"]]

flow.set("Alarmtexte",alarmtexte);

and then I want to edit for eg the 20000.

I have already searched for hours, if someone has something similar, but without success.

Can you help me?

Hi Andreas!

I'm also looking for the same approach. Hope the community can help here!

Thanks a lot in advance

What exactly do you mean? Do you mean you want to change the fourth element in every contained array to something different? If so then you can use the javacscript map() function in a Function node to do that. Have a play with the examples in the link (in a function node) to see how it works. Then ask again if you still can't work it out.

Hi Colin,
No, I mean I want to edit for e.g.: alarmtexte[0][3] in an inputbox in the dashboard template ui.
The full array should be in an table, like that when you push the array to the ui table. But I want to edit the single values

Javascript isn't the big problem, but AngularJS is not my language

Ok, you didn't mention ui-table. Sorry, I don't know about ui-table. Are you able to get the data into the table and see it?

Yes I can get it in the ui table and can see it, but there I cant edit it, and normally I tried to get it in the ui-template but it didnt work.

[{"id":"d38f5dbf74ac9184","type":"ui_table","z":"e6324b52869b1a66","group":"0a759dda9cb883ae","name":"","order":0,"width":"10","height":"8","columns":,"outputs":0,"cts":false,"x":910,"y":100,"wires":},{"id":"1a7b59ab486f5f91","type":"function","z":"e6324b52869b1a66","name":"","func":"alarmtexte=[["000",0,0,20000,"Phase fehlt"],\n["001",0,0,20000,"Steuerspannung Stoerung"],\n["002",0,0,20000,"Not Aus"],\n["003",0,0,20000,"24V Stoerung"],\n["004",0,0,20000," Batterie MIN"]]\n\nflow.set("Alarmtexte",alarmtexte);\nmsg.payload=alarmtexte;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":,"x":690,"y":100,"wires":[["d38f5dbf74ac9184","623ae5652a5b62f5"]]},{"id":"dd734dc07a97dcd8","type":"inject","z":"e6324b52869b1a66","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":530,"y":100,"wires":[["1a7b59ab486f5f91"]]},{"id":"623ae5652a5b62f5","type":"ui_template","z":"e6324b52869b1a66","group":"0a759dda9cb883ae","name":"","order":0,"width":"10","height":"5","format":"\n<tr ng-repeat = “payload in msg.payload”>\n <td ng-repeat =”payload in payload”>{{payload}}

","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":950,"y":160,"wires":[]},{"id":"0a759dda9cb883ae","type":"ui_group","name":"test","tab":"7d587f690b13b3ac","order":2,"disp":true,"width":"10","collapse":false,"className":""},{"id":"7d587f690b13b3ac","type":"ui_tab","name":"test2","icon":"dashboard","disabled":false,"hidden":false}]

I can't help there, sorry. I think there have been a number of posts on editing ui-table entries so start by searching the forum. If still stuck then start a new thread with a subject line that describes the problem, which is how to edit the contents of ui-table cells.

Thank you all for the answers, I'm using JSgrid now, and it works like I want

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