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 value as a number. To insert a numeric value into an attribute please see AttrPutN.
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.
AttrPutS 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 = '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’.
See AttrPutN for inserting the value of a numeric attribute in the same way that AttrPutS does for a string attribute.