TparamItem
You can use this function for Optiva Equations.
Purpose
Returns the net contribution of an item parameter (i.e., the actual
value). The value is based on the percentage or concentration of the parameter and
the formula mass. Suppose the parameter value for one item is 3.33MG/100GM of the
formula and there is 3KG (3000GM) of the item. Then the tparamitem
value is 99.9. The
calculation is 3.333MG/100GM X 3000MG\100GM = 99.9
.
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.
Syntax
Dim variable As String = tparamitem(parameter name,<item code> or <line ID>)
Description
Returns the value of a parameter for each item in the formula. The value is based on the percentage or concentration that is converted for the formula’s mass unit of measure.
Use the Param
function to return the
current (i.e., original or overwritten) concentration or percentage value for the
formula’s parameter. This value is in the parameter’s unit of measure. Suppose the
total (extended) contribution of the parameter for all items is 16.666MG/100GM. Then
Param
returns 16.666.
Use the ParamItem
function to return
the concentration or percentage amount for an item’s parameter in a formula. This
amount 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? Then ParamItem
returns 10 and 20 respectively.
Use the Tparam
function to return
the net contribution of a formula parameter (i.e., the actual value). This value is
based on the percentage or concentration of the parameter and the formula’s mass.
Suppose the total concentration of the parameter for all items is 16.666MG/100GM and
the total quantity for the items is 3KG (3000GM). Then Tparam
returns 499.98. The
calculation is 16.666MG/100GM X 3000GM = 499.98
.
Examples
The equation returns the total value and concentration of sodium for item 1.
Dim sValue As String = paramitem("SODIUM", "Item1")
Dim sValue1 As String = tparam("SODIUM")
MessageList("Concentration of sodium for Item1 =", sValue, "MG/100GM")
MessageList ("Total value of sodium in the formula from Item1 = ", sValue1, "MG")