Did you have more than one configuration file? If so you could have each button node connect send the file name to the file-in node
no, my main goal is to create them all in a single node and a single file, I'll just add 3 buttons and give separate tasks
So you have lost me again. What do you want to create in a single node? Which of the nodes in your flow do you mean?
As in the example, I will have 3 buttons, and whichever button I press will trigger the task in it
I asked What do you want to create in a single node?
and you responded with your entire flow. So are you saying you want to put that all in a single node?
If not, then what do you mean?
yes I want to collect them all in one node
Why? That pretty much defeats the purpose of NR. But if that is what you want to do, have a go at it, but I'm not going to be able to help you out.
Good Luck!
Hello,
I think there is confusion between flow and node.
My understanding is the following :
You want that the link between the button number and the task to be coded in a YAML file to avoid to change the nodered code when you want to change the task.
So basically you should load the file and convert it into and array of object that you store in global context each time the file is changed
Then you just need to send a index from 1 to 3 in the uI button.
This will trigger a function node or change node that with select the right task in the array and send it to the robot using API ā¦
One flow combining all UI buttons into one function node should work
Hope it clarify
Pierre RUWET
thank you for your help but I would be very glad if you show it with a sample flow
The best way to leard is to try, so give it a try and if you have a problem, export your flow and attach it to a reply and explaing where you are having a problem. (If you are unsure how to post code, go back and read the third post in this thread where I gave you information on how to do it)
debug
nodes are very useful in seeing what is going on in a flow. I use them alot while developing flows and them remove them when I get things to work.