I have built a thing to alert me daily if any ink cartridge in our printers <= 20 %, I have further rigged the actionable notifications to tell me what ink is low so I can use this to mark it as ordered.
What I cannot figure out is how to pass this inks name in the attributes field to get thet var set. I could use a switch node instead but that would require a lot more code as well as edits every time a new printer is added. In any case this is so much less code.
Any idea how to get the message payload into the proper location in my function node?
Thanks in advance.
That’s what I was trying but could not figure out how to use my test variable I kept getting:
Attributes:
test: ink data
as output
Could not figure out how to format the usage.
I see another reply with some options and will try them after a bit, breakfast first.
Once a variable is declared in a formula node for the most part, reusing the term inside that same function will result in the value being substituted when executed.
This worked in my function node to send what I wanted, many thanks!
I am having trouble wrapping my head around the use of {}. Not making sense to me yet but hopefully I’ll find the right reference to get it straight in my brain.
Currently using a change node to strip the first few characters from the message returned from my phone and will see if I can get a proper setup using this method as well.