Item Table References

From Planimate Knowledge Base
Jump to navigation Jump to search

Items can carry references to table in a model so it can be referenced anywhere in the model. An item table reference only allows reading of the table.


To use an item table reference, in the Item Edit menu, create a named table reference for the class, say called "test". From now on, when editing a routine with that item flow involved and you select a table, you will now have "<item> test" available, enabling use of the item's reference to supply the table as well as the original tables and <Dynamic>.


Once they are created, any routine with that item flow involved will be able to select that item table reference as a table. Item table references appear in the table selection dropdown with "<item>" in front of them.

Before a reference can be used to access a table, a table has to be associated with it. This is done using the routine "SET" operation as follows:

  • make "Target" a TABLE attref with the item table reference you want to set up (eg: "<item> testtable")
  • make "Set To" a TABLE attref with the table you want to point TO

To actually use the reference, set up your cell/column/etc reference as usual but select the "<item> testtable" instead of a normal table.

An item table reference can be made "Null" so it points to nothing by using the clear operation with the target being set to a TABLE reference naming the item table reference. This will not clear the table itself, just the item's reference to it.

A item table reference only allows reading from the table. This prevents unstructured modelling.

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).




idkbase note 137