ATTRN

ATTRN returns a numeric attribute for a specified element of a dimension.

This function is valid in both TM1® rules and TurboIntegrator processes.

Syntax

ATTRN(dimension, element, attribute)

Argument

Description

dimension

A valid dimension name.

element

An element of the dimension.

attribute

The attribute for which you want to retrieve a value. This argument must be a valid attribute of the element.

Note: : When this function is used in a conditional statement (IF), the statement is the portion containing the condition, not the entire conditional block. After a minor error, execution continues with the next statement. TI processing has no knowledge that it was in a conditional once the minor error is processed, so the next statement is the next line, not the line after the endif.

To avoid this situation, use variables for any operation that could encounter a minor error and then use the variables in the conditional statement. For example:

V1 = CELLGETN('PNLCube', 'fred',
'argentina','Sales','Jan');
IF(V1 = 454);ASCIIOUTPUT
('bug.txt', 'if logic not working
 properly');
ENDIF;

Example

In this example, the function returns the numeric value of the Engine Size attribute of the L Series 1.8L Sedan element in the Model dimension.

ATTRN('Model', 'L Series 1.8L Sedan', 'Engine Size')