AttrPutN TM1 Function: Use and Syntax

AttrPutN is a TM1 Turbo Integrator function that inserts a numeric value onto a specific attribute for the current element in a specified dimension. Note that this function does not insert a string into an attribute. To insert a string value into an attribute please see AttrPutS.

Syntax of AttrPutN

The syntax is AttrPutN(Value, DimName, ElName, AttrName, [LangLocaleCode] );

  • value, is the number that you want to insert
  • dimname, is the dimension that you want to update
  • elname, is the element in the dimension that you want to update
  • attrname, is the attribute of the dimension that you want to update


AttrPutN is used for assigning a specified attribute to an element in a dimension.  For example if we define a couple of variables:

vDim = 'Map Factory';

vAtt = 'Product';

vFactoryTime = 'ABC'

AttrPutN ( 123456, vDim, vFactoryTime, vAtt);

Will place the value 123,456 against the attribute ‘Product’ on the element ABC in the dimension Map Factory.

Note that this will not work when it is combined with a DimensionElementInsert where both are on the Metadata tab. Please see this explanation for more information.

See AttrPutS for inserting the value of a string attribute in the same way that AttrPutN does for a numeric attribute.

You might also like