These functions facilitate the manipulation of attributes.
AttrDelete:
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This function deletes an element attribute from the TM1 database.
Syntax:
AttrDelete(DimName, AttrName);
Arguments:
| Argument | Description |
| DimName | The dimension for which you want to delete an element attribute. |
| AttrName | The name of the attribute you want to delete. |
Example:
AttrDelete('Model', 'InteriorColor');
This example deletes the InteriorColor element attribute for the Model dimension.
AttrInsert:
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This function creates a new element attribute for a dimension. The function can create a string, numeric, or alias attribute.
Syntax:
AttrInsert(DimName, PrevAttr, AttrName, Type);
Arguments:
| Argument | Description |
| DimName | The dimension for which you want to create an element attribute. |
| PrevAttr | The attribute that precedes the attribute you are creating. |
| AttrName | The name you want to assign to the new attribute. |
| Type | The type of attribute. There are three possible values for the Type argument:
|
Example:
AttrInsert('Model', 'Transmission', 'InteriorColor', 'S');
This example creates the InteriorColor string attribute for the Model dimension. This attribute is inserted after the Transmission attribute.
AttrPutN:
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This function assigns a value to a numeric element attribute.
Syntax:
AttrPutN(Value, DimName, ElName, AttrName);
Arguments:
| Argument | Description |
| Value | The value you want to assign to an element attribute. |
| DimName | The parent dimension of the element for which you want to assign an attribute value. |
| ElName | The element for which you want to assign an attribute value. |
| AttrName | The attribute whose value you want to assign. |
Example:
AttrPutN(2257993, 'Model', ' S Series 1.8L Sedan ', 'ProdCode');
This example assigns the value 2257993 to the ProdCode attribute of the S Series 1.8L Sedan in the Model dimension.
AttrPutS:
This is a TM1 TurboIntegrator function, valid only in TurboIntegrator processes.
This function assigns a value to a numeric element attribute.
Syntax:
AttrPutS(Value, DimName, ElName, AttrName);
Arguments:
| Argument | Description |
| Value | The value you want to assign to an element attribute. |
| DimName | The parent dimension of the element for which you want to assign an attribute value. |
| ElName | The element for which you want to assign an attribute value. |
| AttrName | The attribute whose value you want to assign. |
Example:
AttrPutS('Beige', 'Model', 'S Series 1.8L Sedan', 'InteriorColor');
This example assigns the string Beige to the InteriorColor attribute of the S Series 1.8L Sedan in the Model dimension.
0 comments:
Post a Comment