Scanning attribute's values

You can view the example code provided here to scan attribute's values.

var values = attr.getValues(); 
for (i=0; i<values.length; i++) { 
 	task.logmsg("Value " + i + " —> " + values[i]); 
} 

This example processes any attribute object, whether it holds single or multiple values. In reality, there is no difference between single and multiple-value attributes. Every attribute can hold zero, one or more values. A single-value attribute is therefore merely an underloaded multiple-values attribute.