MvMEMBER#
Assigns a structure recordname for a mulidimensional array or structure. Structures are used to store multiple values in a single variable. If a value is assigned to a member that did not previously exist, the entry will be created.
Syntax
<MvMEMBER NAME = "string: { expression } | literal">
Attributes#
Attribute | Description |
---|---|
NAME |
Declares sub-variable name within a structure. |
Only allowed between <MvASSIGNARRAY>
and </MvASSIGNARRAY>
.
Evaluation#
Array elements can be accessed by specifying an array index in square brackets. { l.array[n] }
Members are specified using the colon as a prefix. { l.email:subject }
Example#
It’s often more convenient to refer to tabular data by name rather than number. Structures are name-based collections of variables.
First | Last | Title | |
---|---|---|---|
Row 1 | Fox | Mulder | Special Agent |
Row 2 | Dana | Skully | Special Agent |
Row 3 | Walter | Skinner | Assistant Director |
Structured Arrays#
<MvASSIGNARRAY NAME = "l.agents" VALUE = "Fox">
<MvDIMENSION INDEX = "1">
<MvMEMBER NAME = "First">
</MvASSIGNARRAY>
<MvASSIGNARRAY NAME = "l.agents" VALUE = "Mulder">
<MvDIMENSION INDEX = "1">
<MvMEMBER NAME = "Last">
</MvASSIGNARRAY>
<MvASSIGNARRAY NAME = "l.agents" VALUE = "Special Agent">
<MvDIMENSION INDEX = "1">
<MvMEMBER NAME = "Title">
</MvASSIGNARRAY>
and so on.
<MvEVAL EXPR="{ l.agents[3]:title }"><br>
result: Assistant Director