4D v14.3

EDIT FORM

Home

 
4D v14.3
EDIT FORM

EDIT FORM 


 

EDIT FORM ( aTable ; form {; userForm {; library}} )  
Parameter Type   Description
aTable  Table in Table of form to modify
form  String in Name of table form to modify
userForm  String in Name of the user form to modify
library  String in Full pathname of usable object library

The EDIT FORM command opens the table form set using the aTable, form and the optional userForm parameters in the User form editor:

Note: The window of the editor opens only if it is the first window of the processs. In other words, usually you will need to open a new process to display the editor.

If you pass an empty string in the userForm parameter and if there is not a user form already linked to form, the source form is displayed in the editor. The modified form is then copied in the user structure file (.4DA) and will be used as a form replacement.

If a user form was already generated from form using this command, the user form is displayed in the editor. If you want to start from the source form, you must first delete the user form using the DELETE USER FORM command.

The userForm parameter sets a user form (created using the CREATE USER FORM command) to modify. In this case, the form is displayed in the editor.

In the optional library parameter, pass the full access path of the object library that the user will be authorized to use to customize the form. When used with the User form editor, object libraries will allow you to paste objects with their graphic properties and automatic actions. Objects with methods do not appear in the library. Be careful, it is up to the developer to make sure that the addition of library objects is compatible with the user form (and its objects) in terms of names, variables and types.

In client/server mode, the library must be found in the Resources folder of the database, at the same level as the Plugins folder, so that it is available for all client machines. If the library is valid, it is opened with the form window.

For more information on object libraries, refer to the Design Reference manual of the 4D documentation.

Example  

In this example, the user can choose a library then modify a dialog form:

 MAP FILE TYPES("4DLB";"4IL";"4D Library")
 $vALib:=Select document(1;"4DLB";"Please select a library";0)
 If(OK=1)
  `A library was chosen
    $vALibPath:=Document
 Else
    $vALibPath:=""
 End if
 
 EDIT FORM([Dialogs];"Welcome";"Lib_Logos.4il")
 If(OK=1)
  `Display of modified form
    DIALOG([Dialogs];"Welcome")
 End if

If the user stores the changes made to the form, the OK variable is set to 1. In case of error, OK is set to 0.

An error is generated if:

  • the form has not been declared editable by the user in the Design environment or if it does not exist,
  • the form is already open and being modified in another process,
  • the user cannot access the form because they do not have the proper access rights.
    You can intercept this error with the error-handling method installed by the ON ERR CALL command.

 
PROPERTIES 

Product: 4D
Theme: User Forms
Number: 807

The OK variable is changed by the commandThis command modifies the Error system variable

 
HISTORY 

Created: 4D 2004

 
SEE ALSO 

CREATE USER FORM
DELETE USER FORM
LIST USER FORMS
Overview of user forms

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)