AttrPutS in TM1: How to Use and Syntax

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

Note the function is NOT AttPutS, it has an “r” in it!

Syntax of AttrPutS

The syntax is:

AttrPutS ( Value, DimName, ElName, AttrName, [LangLocaleCode] );


  • value, is the string 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
  • LangLocaleCode is the two letter code associated with the local language. This is optional.


We use AttrPutS for assigning a specified attribute to an element in a dimension.  For example, if we define a couple of variables:

vDim = 'Map Factory';vAtt = 'Factory Time';
vFactoryTime = 'ABC';
AttrPutS ( 'Frank', vDim, vFactoryTime, vAtt);

This code will place ‘Frank’ against the attribute ‘Factory Time’ on the element ‘ABC’ in the dimension ‘Map Factory’.

Note that this function 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 AttrPutN for inserting the value of a numeric attribute in the same way that AttrPutS does for a string attribute.

You might also like