Constant values
Constant values, such as FDA recommended values, can be used in product calculations. These values can be:
- Hard-coded into a
Script Library form with a declaration such as:
Public CONST dailyval As Integer
- Called from Equations or Workflow scripts in a
fashion similar to:
MessageList(libraryname.dailyval)
- Defined in a custom database table or in the Daily Value table (FSDVRULETECHPARAM) and returned to the Script Library using a Table Lookup query.
- Maintained on an extension table with access to both the single object (e.g., = @CONST) and the extension table. Values can be returned to the Script Library using the ObjProperty function.
- Maintained in the
Daily Value Rules form, if the Analysis module is
installed. The value is returned to the Script Library using a script such as:
Dim DV As Double = DailyValueRule("", "CANADA")
- Retrieved as a value from the Daily Value Rule table
using syntax similar to:
Dim val As Double = ObjProperty("DAILYVALUE.PARAM", "DVRULE", "VIT_DEGRADE", "VITAMIN A", 2)
This assumes that you have a Daily Value Rule called
VIT_DEGRADE
. It also assumes that you added a value forVITAMIN A
to that rule.