SFHub Indexed Variables & Attributes
SFHub filed table operators [ ] can be used with Table as well as with all other data types that can be indexed:
Field table operators can be used in sequence; there are no limitations in them.
Assume that:
$MyKeyis an element variable containing a List of strings$MyIndexis an element variable of type number
$$MyDictionary[ $MyKey[ $MyIndex ] ] = 100
The dictionary key will be resolved taking the string contained in the
$MyKey list at the position specified by the
variable $MyIndex.
A new dictionary item will be created with the value [100], if the key is not contained in the dictionary.
The dictionary item will be updated with the value [100], if the key is contained in the dictionary.
Examples
$Material = MyEnum['Material']
The element variable $Material is assigned
with the content of the column [Material]. In
this example we are using a table enumerator (MyEnum).
$Material = MyEnum[ColumnAttribute]
The element variable $Material is assigned
with the content of the column whose name is defined in the Attribute
[ColumnAttribute] of the current element. In
this example we are using a table enumerator (MyEnum).
Notice the difference between these two Examples
$Material = MyEnum['Material']
$Material = MyEnum[ColumnAttribute]
The first example is using a string literal to select the column name,
the column name is enclosed within single quotes ['Material'].
The second example is using an attribute value to select the column
name. The column name is not enclosed within single quotes
[ColumnAttribute]. In this case the value of an
attribute, whose name contains
ColumnAttribute string, will be used to specify the
column name.
If the attribute name represents the exact name of the attribute it MUST be enclosed within quotes.
The following sectiontopic provides additional information about an limitation.