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

Usage

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.

If you like this post, please spread the love…

About John

Managing Director of Infocube. We are a management accounting consultancy that specialises in Business Analytics.

This entry was posted in Attributes, TI Functions. Bookmark the permalink.

2 Responses to "AttrPutN TM1 Function: Use and Syntax"

Log in to post a comment.