myCustomer["customerName"]
You can also use this bracket syntax with an ANY type variable or a Dictionary.
Access to expressions that use dot syntax (such as myRecord.myField) can also be dynamic. The following rule dictates how EGL behaves: If the leftmost part of a field access expression (a series of names separated by dots) is a dynamic type, or another expression whose type is ANY, then EGL uses dynamic access on any fields that follow. In practice this means that the expression must begin with the name of a Dictionary, a non-fixed record, or an ANY type variable for EGL to use dynamic access on fields that follow the expression.
Dynamic access is allowed wherever an ANY type variable is allowed; and wherever there is dynamic access, the type is ANY.
Statements that need the data type of the operands to generate the correct code (such as I/O statements) cannot use dynamic access expressions as operands.
// Define a Dictionary named point point Dictionary{x=1, y=1}; // Access value at key "x" of point anInt = point["x"]; // Access point using normal data access syntax anInt = point.x ; // Access X using variable with value "x" str String = "x"; anInt = point[ str ];