%value%
Expands to the value of a specified parameter.
Syntax
%value ['param-oid'][element]%
Parameters
Parameter |
Values |
Restrictions |
Description |
param-oid |
String |
|
The OID of the parameter whose value is returned |
element |
Integer |
|
The array index to return. For non-array parameters this must be set to 0. |
Example
The following displays the value of a parameter:
<label name="the value of myParam is %value['myParam'][0]%"/>
The following example utilizes the %value% macro to allow the value of one parameter to specify which parameter to process. The parameter OIDName specifies the OID of the parameter which is displayed in the line below. Note that when the parameter OIDName is changed, it is necessary to manually reload the elements which display the results (label1 and label2), as the %value% macro is expanded only when the control is rendered.
<params>
<param name="OID Name" oid="OIDName" type="STRING" value="testOID2"/>
<param name="test OID1" oid="testOID1" type="STRING" value="Fred"/>
<param name="test OID2" oid="testOID2" type="STRING" value="George"/>
</params>
<abs>
<param left="382" oid="params.OIDName" widget="3" width="243">
<task tasktype="onchange">
ogscript.reload ("label1");
ogscript.reload ("label2");
</task>
</param>
<label id="label1" left="382" name="The value of %value['OIDName'][0]% is"/>
<param id="label2" left="575" oid="%value['OIDName'][0]%" widget="1"/>
</abs>
Figure 88 - %value% macro