Vector Reference is a reference to a property set, vector or a child property set. Once defined, you can use Vector Reference as a vector or propertyset.
When the referenced object is reset, the dependent reference is automatically set to NULL.
This property set is particularly useful when accessing data on the child property sets. There are two ways to make a child Property Set reference:
- childPropertySetRef = parentPropertySet[strkeyValue]
- childPropertySetRef = parentPropertySet(nIndex)
About Using Parentheses
Round parentheses ( ) are used to retrieve a child Property Set by index.
NOTE: The index starts at 0.
Square parentheses [ ] are used to get a child Property Set by value.
NOTE: Accessing by value is only valid for Vectors.
Only literals or property names can be used within [ ] or ( ). Expressions cannot be used within.
TIP: To use expressions within [ ] or ( ), assign these to a simple property type and use the simple property within [ ] or ( ).
You can use square and round parentheses in combination.
grandchildPropertySetRef = parentPropertySet(2)["California"]
In the preceding notion, parentPropertySet itself can be a reference. In other words, a reference and a property set are used interchangeably for data access.
Retrieve leaf properties by using square parentheses [ ].
ProductRate = productRate[productId][domain]["Annual Fee"]