getformcustompreference(
DATABASE
,
FORM
,
NAME
)

The getformcustompreference( function returns the value of a form custom preference.


Parameters

This function has three parameters:

database – is the database containing the form. If this parameter is "" or missing, the current database is assumed.

form – is the form in question. If this parameter is "" or missing, the current form is assumed.

name – is the name of the preference.


Description

Any Panorama form can contain one or more custom preference values. These preference values are saved with the form, much like permanent variables are saved with a database. Each preference value has a name. Each form has its own separate custom preference values. Different forms can have preferences with the same name, or different names. Preference values can be set with the setformcustompreference statement.

The getformcustompreference( function returns a specific preference value. If you want to access a preference value in the current form, only one parameter is required, the preference name.

getformcustompreference("Department") ☞ Human Resources

If there is no custom preference named Department, this formula will return an error. You can use the catcherror( function if you’d prefer to return a default value.

catcherror("NONE",getformcustompreference("Department"))

If you need to access a preference value in a specific form (not the current form), two parameters are required. The form name is first, then the preference name:

getformcustompreference("Invoice XR23","Department")

You can add a third parameter (on the front) to access a preference value in a different database. This example returns the value of a preference named Type, in the Labels form in the Customer List database.

getformcustompreference("Customer List","Labels","Type")

See Also


History

VersionStatusNotes
10.0NewNew in this version.