GetValue
Use this function to return a string that contains the contents of the DAL symbolic variable specified by the parameter. You can use this function when the name of the DAL variable is also stored in a variable, such as when a variable has to be addressed in another external script.
Syntax
GetValue (Symbol)
Parameter |
Description |
Symbol |
Enter a string that specifies the name of a DAL symbolic variable. This can be from an expression or from another string variable. |
Note | You will get a syntax error if you omit the Symbol parameter or if the DAL symbolic variable does not exist. It is wise to use this function with the Exists function. |
Example
Here are some examples. Assume the...
- String variable 'my_variable' contains: "Hello World"
- Numeric variable '#_veh' contains: 20
- String variables 'tbl_1', 'tbl_2', 'tbl_3', and 'tbl_4' respectively contain: 'Ford', 'Chev', 'Olds', and 'VW'.
In this example, the variable named contents is set to the string "Hello World":
variable_name = "my_variable"
contents = GetValue(variable_name)
This example stores the value, 20, in the field entitled 'total # of vehicles' in the current section:
SetFld ( GetValue("#_veh"), "total # of vehicles")
In this example, if #line is set to 3, the string 'Olds' is returned. If #line is set to 5, a 'blank' is returned.
If Exists("tbl_" & #line) Then
Return ( GetVaule("tbl_" & #line) )
Else
Return (" ")
End