//Get PID-13 and split on the tilde
var pid13 = StringUtils.splitByWholeSeparator(message.getNode('PID-13'), '~');
//Loop through each instance
for (var i=0 ; i < pid13.length ; i++) {
//Check to see if we have a phone number for Home, Cell, Work and set the appropriate value
if (message.checkNodeIsNotBlank('PID-13['+(i+1)+'].1')) {
qie.debug('Inside for loop: ' + i);
var description;
switch(i) {
case 0:
description = 'PH';
break;
case 1:
description = 'CP';
break;
case 2:
description = 'WK';
break;
}
//Set value into message
message.setNode('PID-13['+(i+1)+'].3', description);
}
}