KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to access methods and 4D Commands in Quick Report editor with new processes
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: September 8, 2006

The Quick Report editor uses the Formula Editor as an interface to input methods and commands.

Chapter 3, Section "Formula Editor", of the 2004 Upgrade Manual describes changes to the Formula Editor, which explains why project methods and 4D Commands, available to the editor in earlier versions of 4th Dimension, have been removed in 2004. The change allows the designer to reinforce data security within the Formula Editor.

Only 4D Commands that are "formulas" are displayed in the list of commands and accepted in the text of the formula. Other 4D Commands can be made available but only through project methods that call them. This is detailed in Chapter 3, Subsection "List of Commands".

The proper way to allow the use of methods in the Formula Editor is detailed in Chapter 7, Section "Formula". Basically, whenever a new process is created that allows the user to use the Formula Editor, run a method that sets which methods can be used within the Formula Editor. Here is an example:


````````````````````````````````````````````````````
` Project Method: FE_Allowances
` Description: Allow the use of useful project methods in the formula editor for the current process
` Parameters: none
````````````````````````````````````````````````````
ARRAY STRING(8;$myarray;2)

` display all project methods whose names include the string "fEditr" or start with "myQR_" in the Formula Editor
$myarray{1}:="@fEditr@"
$myarray{2}:="myQR_@"

SET ALLOWED METHODS($myarray)  ` updates the formula editor for the current process

````````````````````````````````````````````````````

You can easily add 4D Commands to project methods and make those methods available to re-enable the use of those 4D Commands. You can also find what methods have been allowed in the current process by calling GET ALLOWED METHODS(setMethodsArray), which is detailed in Chapter 7, Section "Formula".

If SET ALLOWED METHODS has not been used in the current process, GET ALLOWED METHODS(getMethodsArray) returns getMethodsArray with zero elements.

Databases that allowed the use of methods within the Formula Editor in previous versions of 4th Dimension must be updated, based on the above changes, by the designer to continue allowing such use in 2004.