I am trying to check to see if a node is blank, and if it isnt, then append additional information to it. This portion I can do. What I am wanting to do is a if /else and have it adjust another node if the node being check is blank.
I have tried the following and it tells me that the value is already defined.
if (source.checkNodeExists('PID-14.1')) {
var value = source.getNode("PID-14.1");
message.setNode("PID-14.1","^PT^" + value);
} else {
var value = source.getNode("PID-13.1");
message.setNode("PID-13.1","^PT^" + value);
}
What can I do to make this work?