Use navigation elements to access the runtime hierarchy
In addition to using special variables, you can also use navigation elements to reference fields values and variables.
Smart parameters support the following navigation elements:
| Example | Description |
|---|---|
| \< field_name> | References a field that is 1 level beneath the current object |
| ..\< field_name> | References a field at the same level as the current object |
When you reference a field by specifying just the name of the field, Datacap retrieves the text value of the field. You can obtain the value of a variable that is associated with the field by appending .<variable_name>, for example: ..\Car_Type.TYPE.
You cannot use this syntax to access variables on parent objects.
Examples
In these examples, the rr_Get action is bound to a field.
- In the first example, the smart parameter returns the text of the Car_Type field on the current page.
- In the second example, the smart parameter returns the value of the TYPE variable of the Car_Type field.
Action: rr_Get("..\Car_Type") <F id="Car_Type">
Return value: SUV <V n="TYPE">Car_Type</V>
<C cn="10" cr="588,748,600,769">83</C> <-- ASCII ‘S'
Action: rr_Get("..\Car_Type.TYPE")
<C cn="10" cr="605,748,620,769">85</C> <-- ASCII ‘U'
Return value: Car_Type
<C cn="10" cr="625,748,643,769">86</C> <-- ASCII ‘V'
</F>