The setformcustompreference statement sets the value of a form custom preference.
This statement has four parameters:
database – is the database containing the form. If this parameter is
"", the current database is assumed.
form – is the form in question. If this parameter is
"", the current form is assumed.
name – is the name of the preference.
value – is the new value of the preference.
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 accessed with the getformcustompreference( function.
The setformcustompreference statement sets the value of a form custom preference (and creates it if it did not exist). This example sets the Department preference of the current form to Human Resources.
setformcustompreference "","","Department","Human Resources"
You can set multiple preference values at once with a single statement:
setformcustompreference "","", "Department","Human Resources", "Region","Europe", "Visibility","Public"
If you need to set a preference value in a specific form (not the current form), just specify the form name:
setformcustompreference "","Form AX87","Department","Human Resources"
You can also set a preference value in a different database. This example sets the value of a preference named Type, in the Labels form in the Customer List database.
setformcustompreference "Customer List","Labels","Type","Organic"
|10.0||New||New in this version.|