The setfilevariable statement sets the value of a fileglobal variable in another database.


This statement has three parameters:

database – the name of the database that contains the fileglobal variable. This database must be open. If the parameter is empty, the currently active database is used.

variable – the name of the fileglobal variable. Since this is the name of the variable, and not the variable itself, you usually need to quote the name (unless you are somehow calculating it with a formula).

value – the value to be placed into the fileglobal variable.


This statement changes the value of a fileglobal variable in another database. If the variable doesn’t already exist, it will be created. This example sets the HomeZipCode fileglobal variable in the Contacts database to 91209.

 setfilevariable "Contacts","HomeZipCode","91209"

Note: This statement is extremely fast, and sets the value without temporarily switching to the specified database.

Note: This statement is nearly identical to the setfileglobal statement. However, the setfilevariable statement requires all three parameters, while the setfileglobal statement allows the database parameter to be omitted for the current database.

See Also


10.0UpdatedCarried over from Panorama 6.0, but now creates the variable if it doesn't already exist.