Search code examples
node.jsnode-red

unable to use variable in ui in node-red


Hi have a property "timestamp" in my msg, and I want to use that property as part of the file name in a file_out node for example... /home/pi/Documents/sensortag/test-{{timestamp}}

But the variable is not replaced, do I use the wrong syntax ?


Solution

  • Not all nodes support the {{template}} format in their properties, and in this case, the File node doesn't.

    You can use a Template node to set the msg.filename property on the message before passing it to the File node.