Table of Contents

, , ,

GET_ATTR_VALUE

Description

This function is useful when you have to get an attribute value of a certain instance in Context (where there are multiple instances of the object of the required type in the Context).

Syntax

GET_ATTR_VALUE (object, attribute, index)

Parameters

  1. The name of the required object
  2. The name of the required attribute in the object
  3. The index of the required instance in Context (starting from 0)

Returns

Same type as the attribute: the value of the attribute of the instance at the given Context index (counted from 0), or undefined if there is no such instance. All three parameters must be literals

Example

FIND ALL MyObject ORDER BY MyObject.SomeAttribute
IF GET_ATTR_VALUE ('MyObject', 'MyAttribute', 5) = 'abc' THEN ... 

CONTEXT_SIZE, IN_CONTEXT, EVAL_STRING