Description

 

GETITEMVALUE is a powerful function which is used to return a value of an attribute/calculated value that another item hold. The calculation is commonly used in conjunction with WHERE and IF functions, to create a more defined calculation. It is very similar to the GETITEMVALUES function, which can return more than one item’s/attribute/calculated value codes value by using an array.

 

Syntax

 

GETITEMVALUE(x, y, z)

 

Parameters

 

= Item Identifier: The name (default) or internal/external ID of the RETURNING item you wish to find the value for. If the Type is not specified, name is the default property that will be used in searching for the returning item.

 

y = Code Value: This is the attribute/calculated value code that you wish to return.

 

z = Type (OPTIONAL): What property type does the Item Identifier map to, either name (default) or external/internal ID.  

 

Type of Data Returned

 

GETITEMVALUE returns any data type that you specify in the calculated values dialog when creating a new calculation.

 

Example

 

Returning the cost attribute value of ITEM 1:

 

GETITEMVALUE(‘ITEM 1’, ‘cost’) – This will return the cost value that ITEM 1 holds to ALL ITEMS (including ITEM 1).

 

Having run a WHERE calculation, you have the result of an internal ID of an item (1001), which you use to find that item’s “RAG Status”.

 

GETITEMVALUE(1001, ‘RAG Status’, ‘Internal ID’) – This means that as the Type field is set to Internal ID, this means that you are mapping the Item Identifier field to Internal ID, and you wish to return the “RAG Status” of the specified return item.

 

Returning the cost of items based upon a reference (Ref) attribute which refers to different items in the story.

Item(name)

Cost

Ref

Result

ITEM1

99

ITEM2

100

ITEM2

100

ITEM3

101

ITEM3

101

 

ERROR, no ref 

 

 

 

 

 

 

 

GETITEMVALUE(Ref,’Cost’) – Breaking this function down, this means finding the ‘Cost’ values of items listed in the ‘Ref’ attribute on those items. As no Type has been specified, name is taken by default which is correct for the problem we are trying to solve.