Param

You can use this function for Optiva Equations.

Purpose

Returns the value of an object’s (formula, item) parameter, using the parameter’s unit of measure. For example, if the value is 16.666 and the unit of measure is MG/100GM, 16.666 is returned.

The param functions return a string unless you convert them to a numeric data type before performing numeric operations, such as addition. Otherwise, you get a concatenated string when you add several values.

Equations for Alt UOM conversions should use ObjProperty to obtain the parameter values. Do not use Param or ParamItem.

Syntax


Dim variable As String = param(parameter name)

Description

If the parameter is a concentration or percentage, then it uses the concentration or percentage. It does not use the actual amount (i.e., mass) of the parameter in the formula.

Suppose the parameter value is 50 and the unit of measure is %. Then, 50 is returned using this function. If the value is 16.666 and the unit of measure is MG/100GM, 16.666 is returned.

Use ParamItem to return the concentration or percentage amount for an item’s parameter in a formula. This value is in the parameter’s unit of measure. What if the concentration of the parameter for one item is 10MG/100GM and the other item is 20MG/100GM? ParamItem returns 10 and 20 respectively.

Use Tparam to return the net contribution of a formula’s parameter (i.e., the actual value). This value is based on the percentage or concentration of the parameter and the formula’s mass. If the total concentration of the parameter for all items is 16.666MG/100GM and the total quantity for the items is 3KG (3000GM), Tparam returns 499.98. The calculation is 16.666MG/100GM X 3000GM = 499.98.

Use TparamItem to return the net contribution of an item’s parameter (i.e., the actual value). This value is based on the percentage or concentration of the parameter and the formula’s mass. If the parameter value for one item is 3.33MG/100GM of the formula and there is 3KG (3000GM) of the item, the tparamitem value is 99.9. The calculation is 3.33MG/100GM X 3000GM\100GM = 99.9.

Example

The equation returns the value of the parameter CALCIUM; the value is divided by two. The parameter is defined initially by an equation at the item level. Then, the parameter is rolled up. Assign the parameter to the lab as Rollup. If the CALCIUM parameter is overridden at the formula level, then the param function uses the overridden value.


Dim sHalf As String = param("CALCIUM")/2
Dim iValue As Integer = SetParam("CALCIUMHALF", sHalf)

SCC and UPC codes

See Equations for SCC and UPC codes.