Item Table References

From Planimate Knowledge Base
Revision as of 21:02, 17 April 2010 by Rick (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Item Table References enable an item to carry around a reference to a table in the model. They are useful when sending message items to remote locations where the table is either not in scope or determined by from where the item is coming from.

Item table references are created from the Item Class Edit context menu just like Item Attributes. Once created, they appear in item attribute lists displayed by the expression editor and within the table list of the attribute reference dialog - as long as the object being edited has flows for that item class using it.

Before a reference can be used to access a table, a table has to be associated with it. This is done using the regular routine "Set (=)" operation, eg:

i.itemtablename[] = t.tablename[]

Then i.itemtablename[] ban be used as a regular table reference eg:


An item table reference can be made "Null" so it points to nothing by using the Clear operation, this will then display as:

i.itemtable[] = CLEAR

In places where the original item table is in scope, an item table reference allows both reading and writing to the table. If the table is not in scope, it is read only. However a mechanism exists to grant write access to an out of scope table. This is achieved using the OutOfScopeWrite operation on the item table reference. This must be performed at a location where the table referenced is still in scope.

During a run, ctrl-clicking on an item shows any item table references and what they are pointing to.

Column labels can be used with item table references. They will be looked up on the fly but cannot be browsed in the editor, you have to enter the name manually since the editor does not know which table an item table reference will be pointing to.

Splitters with the "Transfer Item Attributes" option "on" will also transfer table references. The transfer is name matched and partial transfers are always allowed (the Allow Partial Transfers option is ignored for item table references).