Skip to main content
Version: Next

NO DEFAULT TABLE

NO DEFAULT TABLE

Does not require any parameters

Description

The NO DEFAULT TABLE command is used to cancel the effect of the DEFAULT TABLE command. After this command is executed, there is no longer any default table defined for the process.
This command will have no effect if the DEFAULT TABLE command has not been called beforehand.

This command concerns the use of project forms (forms not linked with tables): most of the commands related to forms (apart from user forms) accept an optional aTable parameter as their first parameter. For example, this is the case with the _o_FORM GET PARAMETER, Open form window or DIALOG commands. Since a project form and table form can have the same name, this parameter can be used to determine the form to be used: pass the aTable parameter when you want to target the table form and omit it in the case of a project form.

In a database containing a project form named “TheForm” and a table form with the same name for the [Table1] table:

 DIALOG([Table1];"TheForm") //4D uses the table form
 DIALOG("TheForm") //4D uses the project form

However, this principle is null and void if the DEFAULT TABLE command is executed when the database contains a project form and a table form with the same name. In fact, in this case 4D will use the table form by default, even if the aTable parameter is not passed. In order to guarantee the use of project forms, simply use the NO DEFAULT TABLE command.

Example

In a database containing a project form named “TheForm” and a table form with the same name for the [Table1] table:

 DEFAULT TABLE([Table1])
 DIALOG("TheForm") //4D uses the table form
 NO DEFAULT TABLE
 DIALOG("TheForm") //4D uses the project form

See also

DEFAULT TABLE

Properties

Command number993
Thread safe