Hello, sorry if this does not go here, but I am very new to this.
I have a doubt that I have not been able to solve by myself.
I have an inject to a "socketcan -in" as I show in the attachment.
that inject sends this json
My question is. if I can individually vary the values of "data" (1,2,3,4,5 ...) from a text box or similar and send it modified to the socketcan.
Thanks in advanced!
Of course you can, but you need to use
text input node―or whatever suits your requirement: "individually vary the values"―in the dashboard.
change and use a JSONata expression to merge the user-provided values accordingly into the JSON you require.
If you have a lot of numbers to input (or maybe a variable number of inputs) and need to create form for them, you can also use the ui-template Dashboard node and use the features of the underlying Angular framework.
ng-repeat will let you dynamically build any HTML/Angular structure including multiple input boxes.
Alternatively, you could us a single textbox input and collect the numbers as a string then parse that string either using a function node or a change node with the JSONata
JSONata in a change node:
Which should return an array from the original string.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.