AttrPutN
Description:
Assigns a value to a numeric element attribute.
Syntax:
AttrPutN(Value, DimName, ElName, AttrName);
Arguments:
Value - Attribute value
DimName - Dimension name in which this attribute exists
ElName - Element name in which to set value
AttrName - Attribute name
Return Type:
Nothing
Example:
AttrPutN(123456, 'Products', 'L Series', 'ProductCODE');
It will assign value 123456 to attribute ProductCODE in Products dimension for element L Series.
I had created a TI to assign location codes to my attribute “LocationCode” to my locations. So I used variable vLocationCode for assigning the attribute to my various dimension items.
My dimension was Locations whereas my dimension item variable was vLocation. So here is the code that I would use in such situation:
ATTRPUTN(vLocationCode,’Locations’,vLocation,’LocationCode’);