TupleRowToItem: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
== Operation  ==
For the specified row, the operation will '''''set''''' item attributes that have the same name as the column names&nbsp;of the specified table.<br>
For the specified row, the operation will '''''set''''' item attributes that have the same name as the column names&nbsp;of the specified table.<br>


Line 5: Line 7:
*Numerical values will be set regardless of the formatting of the columns (cells) or item attributes.  
*Numerical values will be set regardless of the formatting of the columns (cells) or item attributes.  
*Matching item attribute and column names are NOT case sensitive.
*Matching item attribute and column names are NOT case sensitive.
&nbsp;
== Example  ==
An item has the following attributes (only):
''i.ID = 1111''
''i.Colour = Blue''
''i.Size = Large''
A table named ''Location ''exists as follows:
{| cellspacing="1" cellpadding="1" width="200" border="1"
|-
| ''ID''
| ''Name''
| ''Colour''
| ''Location''
|-
| 2345
| Turner
| Red
| Hobart
|-
| 3523
| Lisbon
| Green
| Brighton
|}
&nbsp;
Applying the Routine Operation '''TupleRowToItem((t.location.Row(2))'''
Would '''''set''''' the item attributes to the following values:
''i.ID = 3523''
''i.Colour = Green''
<span id="1231385826222S" style="display: none">Note:</span>
*''i.Size ''remains unchanged as it doesn't appear as a column in the table.
*''i.Location''&nbsp;doesn't exist so it is not set.
&nbsp;
&nbsp;


[[Category:Routine]]
[[Category:Routine]]

Revision as of 14:45, 8 January 2009

Operation

For the specified row, the operation will set item attributes that have the same name as the column names of the specified table.

Note:

  • Numerical values will be set regardless of the formatting of the columns (cells) or item attributes.
  • Matching item attribute and column names are NOT case sensitive.

 

Example

An item has the following attributes (only):

i.ID = 1111

i.Colour = Blue

i.Size = Large

A table named Location exists as follows:

ID Name Colour Location
2345 Turner Red Hobart
3523 Lisbon Green Brighton

 

Applying the Routine Operation TupleRowToItem((t.location.Row(2))

Would set the item attributes to the following values:

i.ID = 3523

i.Colour = Green

  • i.Size remains unchanged as it doesn't appear as a column in the table.
  • i.Location doesn't exist so it is not set.