SetParam

You can use this function for Optiva Equations.

Purpose

Sets the parameter that is assigned to the equation to a specific value.

Syntax


Dim variable As Integer = SetParam(name,new value, rollupFlag)

Arguments

Part Description
rollupFlag Applies to rollup parameters only. It is ignored by non-rollup parameters.
  • 0 - Keep the current rollup value.
  • 1- Override the current rollup value.

Description

If the returned parameter is Numeric Info, then the number that is used in the equation is returned. If the parameter type is Unit Activity, Weight % or Volume %, then the number is converted to the appropriate units or percentage.

Example

The equation returns the value of the parameter CALCIUM. This 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 iReturncode As Integer = SetParam("CALCIUMHALF", sHalf)