INPUT FORM

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004 (Modified)


INPUT FORM ({table; }form{; userForm}{; *})

ParameterTypeDescription
tableTableTable for which to set the input form, or
Default table, if omitted
formStringName of the form to set as input form
userFormStringName of user form to use
*Automatic window size

Description

The INPUT FORM command sets the current input form for table to form or userForm. The form must belong to table.

The scope of this command is the current process. Each table has its own input form in each process.

INPUT FORM does not display the form; it just designates which form is used for data entry, import, or operation by another command. For information about creating forms, see the 4th Dimension Design Reference..

The default input form is defined in the Design environment Explorer window for each table. This default input form is used if the INPUT FORM command is not used to specify an input form, or if you specify a form that does not exist.

The optional userForm parameter lets you specify a user form (coming from form) as the default input form. If you pass a valid user form name, this form will be used by default instead of the input form in the current process. This allows you to have several different custom user forms simultaneously (generated using the CREATE USER FORM command) and to use the one that suits according to the context.

For more information about user forms, refer to the Overview of user forms section.

Input forms are displayed by a number of commands, which are generally used to allow the user to enter new data or modify old data. The following commands display an input form for data entry or query purposes:

ADD RECORD

 DISPLAY RECORD

MODIFY RECORD

 QUERY BY EXAMPLE

The DISPLAY SELECTION and MODIFY SELECTION commands display a list of records using the output form. The user can double-click on a record in the list, which displays the input form.

The import commands IMPORT TEXT, IMPORT SYLK and IMPORT DIF use the current input form for importing records.

The optional * parameter is used in conjunction with the form properties you set in the Design environment Form Properties window and the command Open window. Specifying the * parameter tells 4D to use the form properties to automatically resize the window for the next use of the form (as an input form or as a dialog box). See Open window for more information.

Note: Whether or not you pass the optional * parameter, INPUT FORM changes the input form for the table.

Examples

1. The following example shows a typical use of INPUT FORM:

   INPUT FORM ([Companies]; "New Comp")  ` Form for adding new companies 
   ADD RECORD ([Companies])  ` Add a new company

2. In an invoicing database managing several companies, the creation of an invoice must be carried out using the corresponding user form:

   Case of
   : (company="4D SA")
      INPUT FORM([Invoices];"Input";"4D_SA")
   : (company="4D Inc")
      INPUT FORM([Invoices];"Input";"4D_Inc")
   : (company="Acme")
      INPUT FORM([Invoices];"Input";"ACME")
   End case
   ADD RECORD([Factures])

See Also

ADD RECORD, CREATE USER FORM, DISPLAY RECORD, DISPLAY SELECTION, IMPORT DIF, IMPORT SYLK, IMPORT TEXT, MODIFY RECORD, MODIFY SELECTION, Open window, OUTPUT FORM, QUERY BY EXAMPLE.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next