This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
FORM Convert to dynamic
|
FORM Convert to dynamic ( {aTable ;} formName ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
aTable | Table |
![]() |
Form table | |||||
formName | Text |
![]() |
Name of a "classic" project or table form | |||||
Function result | Object |
![]() |
formName converted to dynamic form | |||||
The FORM Convert to dynamic command converts the formName (classic form) to a dynamic form and returns it in an object.
Classic forms are 4D forms stored within the structure file in binary format. Dynamic forms are forms whose structures are defined in a 4D object (or a .json file). For more information, please refer to the Dynamic Forms section.
If you want to convert a table form, pass the form table in the aTable parameter and then pass its name as a string in formName. For a project form, pass the form name directly in formName.
In order to be able to run the form directly by passing the resulting object to the DIALOG command, FORM Convert to dynamic applies specific rules when converting the form:
Note: References to the form method and form object methods are exported with internal IDs, which will be valid only in the current database while formName methods are not modified. If you want to use the exported form in another context, you need to assign project method names to the form or form object "method" property (see example).
You want to convert a classic form, modify it, and display it.
The original form:
C_OBJECT($dynForm)
$dynForm:=FORM Convert to dynamic("FormToConvert")
$dynForm.pages[1].objects.TitleArea.stroke:="red"
$dynForm.pages[1].objects.bOK.method:="myMethod" //associate a project method
DIALOG($dynForm)
If you execute the code:
Product: 4D
Theme: Forms
Number:
1570
Created: 4D v17 R3
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)