Brand new to coding in Qvera so i'll apologize off the bat for bad use of terms. Just getting my grips on basic understanding of the logic so hopefully i'm asking the question right. I have a peice of code that Qvera provided us to remove OBX segments where OBX-4 equals or not equals a value for example:
message.removeAllNodes('OBX[@4=2]');
var old2 = source.getNode('OBX[@4=2]');
message.addChildAfter('PV1', 'OBX', old2);
or
message.removeAllNodes('OBX[@4!=1]');
var old2 = source.getNode('OBX[@4!=1]');
message.addChildAfter('PV1', 'OBX', old2);
I get it and understand this (mostly), but what i need is to keep the line that is null and 1 and dump everything else. So in my head something like remove all if OBX-4 isn't null or 1. So to get the null piece I tried:
message.removeAllNodes('OBX[@4!=null]');
var old2 = source.getNode('OBX[@4!=null]');
message.addChildAfter('PV1', 'OBX', old2);
This removed every line which is where I decided to come here and make my first post.
Any idea? Am I even treking down the right path.
Thanks in advance!