AltUomCachedParamDouble
You can use the AltUomCachedParamDouble
function in Optiva Alt UOM Equations.
Purpose
Boost performance by caching a TP value once during the conversion process
so that all UOM equations can access a common value. The profile ALTUOMGLOBALTPVARS
controls which TP will be cached. Only numeric TPs can be
used with this function.
Syntax
Public Overrides Function AltUomCachedParamDouble(paramName As String[, ValueType As String]) As Double?
Optiva will
return the given requested data field for the requested parameter. The optional ValueType
argument can be one of the value of PVALUE
(default),
MINVAL
, MAXVAL
, or TARGET
.
This function returns the TP value as a .Net Nullable Double data type. This allows the equation to handle TPs that do not have a value and being strongly typed as Double value. It removes the need to convert the value from a string into a double value.
Example
Dim dDensity As Double? = AltUomCachedParamDouble("DENSITY", "PVALUE")
AltUOMCachedParamDouble
function with a parameter that is not listed in the
profile attribute ALTUOMGLOBALTPVARS
, the "ParamCode/ValueType not configured for
AltUomCachedParamDouble" error message is displayed.