1. Home
  2. Docs
  3. Choosers and Designers
  4. Field Chooser
  5. Context References

Context References

Expanding the field category Context Reference in the field chooser will display the following forms:

  • All master forms in the system including the Organization master form
  • All detail line forms found on all master forms in the system
  • Calendar Fiscal Year (currently not useable)
  • Calendar Day (currently not useable)
  • Calendar Accounting Period (currently not useable)
Using the field category Context Reference it is possible to select any field on any form in the system even though the current form has no form reference field to the other form.

A context reference is like a Form Reference in that it allows access to fields on other forms. A form reference is a field on the form that gives an explicit reference to the target form. A context reference, however, does not depend on any explicit relationship between the forms. It assumes the form that is being referenced will be in context when the context reference is evaluated. To be "in context" means that a data form will available when needed.

For example, if you have a period form(P) that gives a date range and another form(A) that has a date. It is often useful to have a report that shows all the A forms that are in the date range. Such a report would be constructed by having a level with a form stack of P forms and then a lower level  a form stack of A forms (say from a form stack definition on the Organization form). Selection conditions for such a form stack are definitions on the A form. When writing the selection expression to filter out A forms not in the date range, it is necessary to compare the date in A to the start and end dates of the range in P. However there is no reference to P on A. When choosing a context reference every master form is offered and if P is chosen it can then be used to access fields on P such as the start and end date. When the report is run a P form will be in context every time you get a form stack of A forms which requires evaluating the context reference. Formever uses the P form in context to follow the reference to get to the dates.

One can see that using context references requires that they be used in situations where they make sense i.e. when the referenced form is in context. If they are used otherwise then in the case of a report, report errors will be generated.

Although context references are mainly used in reports they have a use in selection lists. When a selection list is triggered by another list (using the Display a list of associated forms) the when selection expressions are evaluated on forms in the subordinate list the controlling form is in context (i.e. the form from which the selection list was created from). This allows selections and sorting on the subordinate list to use fields on the controlling form in their evaluation.

Field chooser highlighting context references category
Was this article helpful to you? Yes No

How can we help?