ValParam
You can use the ValParam function to return the value of an objects parameter (formula or item) in the parameters assigned unit of measure.
This function is specifically designed to handle the Equation Total Parameters correctly, where the standard Param function may return incorrect values because of the modified state of the parameter.
When to use
You can use this function to:
- Retrieve a parameter value in its assigned unit of measure.
- Avoid equation support issues by using it instead of
Param().
Syntax
string ValParam(string paramName);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| paramName | string | Yes | The name or code of the parameter whose value is retrieved. |
Return Value
The application returns a string containing the parameter value in its assigned unit of measure if the operation is successful.Impact
Always returns the value in the parameters assigned unit of measure.
Prerequisites
Always returns a string, even for numeric values.
Param VS ValParam
- The
Paramfunction may return incorrect values for parameters assigned to the lab as Equation Total. - The
ValParamfunction is the recommended function for Equation Total Parameters to ensure accurate values.