Item Table References: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Items can contain dynamically assigned references to tables in a model enabling that table to be read anywhere in the model where that item travels.
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.


Item table references are created in the Item Edit menu for the item class.
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[]


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.
Then i.itemtablename[] ban be used as a regular table reference eg:


i.itemtablename[3][2].


Before a reference can be used to access a table, a table has to be associated with it.<br /> This is done using the routine "SET" operation as follows:
An item table reference can be made "Null" so it points to nothing by using the Clear operation, this will then display as:  
*make "Target" a TABLE attref with the item table reference you want to set up (eg: "&lt;item&gt; testtable")
*make "Set To" a TABLE attref with the table you want to point TO


i.itemtable[] = CLEAR


To actually use the reference, set up your cell/column/etc reference as usual but select the "&lt;item&gt; testtable" instead of a normal table.
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.


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


A item table reference only allows reading from the table. This prevents unstructured modelling.
[[Category:Item]] [[Category:Object/Splitter]] [[Category:Table]]
 
 
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).<br /><br />
----
[[Category:Item/Table]]
[[Category:Object/Splitter]]
[[Category:Reference/Table]]
[[Category:Table]]
<font size="2">idkbase note 137</font>

Latest revision as of 21:02, 17 April 2010

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:

i.itemtablename[3][2].

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