This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
EDIT FORMULA
|
EDIT FORMULA ( aTable ; formula ) | ||||||||
Parameter | Type | Description | ||||||
aTable | Table |
![]() |
Table to display by default in the Formula editor | |||||
formula | Text |
![]() |
Variable containing the formula to display in the Formula editor or "" to display editor only | |||||
![]() |
Formula validated by the user | |||||||
The EDIT FORMULA command displays the Formula editor in order to let the user write or modify a formula. The editor contains the following on opening:
The user can modify the formula displayed and save it. It is also possible to write or load a new formula. Regardless, if the user validates the dialog box, the system variable OK is set to 1 and the formula variable contains the formula defined by the user. If the user cancels the formula, the system variable OK is set to 0 and the formula variable is left untouched.
Notes:
Keep in mind that when the dialog box is validated, the command does not execute the formula; it only validates and updates the contents of the variable. If you want to execute the formula, you must use the EXECUTE FORMULA command.
Displaying the Formula editor with the [Employees] table and without a pre-entered formula:
$myFormula:=""
EDIT FORMULA([Employees];$myFormula)
If(OK=1)
APPLY TO SELECTION([Employees];EXECUTE FORMULA($myFormula))
End if
If the user validates the dialog box, the system variable OK is set to 1. If the user cancels the dialog box, the system variable OK is set to 0.
Product: 4D
Theme: Formulas
Number:
806
Modified: 4D 2004.4
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)