Version

Using a NamedReference in a Formula

A NamedReference is essentially a formula that is independent of a control. NamedReferences have many uses, such as defining constants or formulas that are used in other calculations but do not need to be visible to the end-user.

The most important properties of the NamedReferences are:

Property Name Description

Used by the FormulaBuilder to organize NamedReferences.

Key

A unique key for this NamedReference. Key is used to reference the NamedReference in a formula.

The formula for this NamedReference. Note that Formula can be a literal, so that NamedReferences can be used as constants.

FormulaResult (run-time only)

FormulaResult returns the calculated result of the formula.

  1. To add a NamedReference, simply go to the NamedReferences property of the UltraWebCalcManager component and click the ellipsis to open the collection editor. Use the Add button to add new NamedReferences to the collection.

  2. To create a constant, simply assign a literal value to the Formula. For example, define a NamedReference with a Key of "Pi" and set the Formula to "3.1415".

Images\WebCalcManager Overview Named References 01.png
  1. To use a NamedReference in a Formula, simply enclose the Key of the NamedReference in square brackets and add a double slash, as in: "[//Pi] * [//Radius]^2 ".