Reference property

FormScreen.Reference — FormScreen

A reference to the form screen.

Referencing a form screen is useful when writing formulas for the IncludedFields property of open report buttons, email report buttons, server relay buttons and reset buttons. When a form screen is included in the IncludedFields array, it causes all fields of the form screen to be included.

Referencing a form screen is also useful when writing formulas for the NextScreen property of form screens, text screens and navigators. When a text screen is referenced from these formulas, it is selected as the screen which is displayed when the user moves on from the current screen.

This property is a read-only property, meaning that no formula can be assigned to it.

Referencing form screens from formulas

When referencing a form screen from a formula, there is no need to write .Reference,Reference after the screen name if a reference is sought. These formulas are equivalent when associated with the NextScreen property of text screens:

FormScreen1FormScreen1
FormScreen1.ReferenceFormScreen1,Reference

Above, the NextScreen property is looking for a screen reference. As FormScreen1 can return a reference through its Reference property, .Reference,Reference is implied.

Examples

{ FormScreen1 }{ FormScreen1 }

This formula is associated with the IncludedFields property of an open report button and causes all fields of the form screen to be included in the report.

{ FormScreen1.Reference }{ FormScreen1,Reference }

This formula is associated with the IncludedFields property of an open report button and causes all fields of the form screen to be included in the report. Writing out the Reference property in formulas (by writing FormScreen1.ReferenceFormScreen1,Reference) is rarely necessary.

IF(ResetAllFields, { FormScreen1 }, Field1:Field10)IF(ResetAllFields; { FormScreen1 }; Field1:Field10)

This formula is associated with the IncludedFields property of a reset button. If the ResetAllFields switch field is toggled to its "on" position, all fields of the form screen are reset (courtesy of FormScreen1FormScreen1 being part of the first array). Otherwise, only Field1, Field10 and all fields that appear between them are reset.

IF(Field1.Valid && ISDEFINED(Field2), SuccessScreen, FailureScreen)IF(Field1,Valid && ISDEFINED(Field2); SuccessScreen; FailureScreen)

This formula is associated with the NextScreen property of a form screen. It causes the screen named SuccessScreen to be displayed when the user moves to the next screen only if Field1 is considered valid (as determined by the Valid property of the field) and the user has entered information in the Field2 field. Otherwise, the screen named FailureScreen is displayed.