SET ALLOWED METHODS

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.4 (Modified)


SET ALLOWED METHODS (methodsArray)

ParameterTypeDescription
methodsArrayArray stringArray of method names

Description

The SET ALLOWED METHODS command allows you to define methods that are displayed in the Formula editor for the current session. The designated methods will appear at the end of the list of commands and can be used in formulas. By default (if this command is not used), no methods are visible in the Formula editor. If a formula uses an unauthorized method name, a syntax error is generated and the formula cannot be validated.

Pass the name of an array containing the list of methods to offer in the Formula editor in the methodsArray parameter. The array must have been set previously.

You can use the wildcard character (@) in method names to define one or more authorized method groups.

If you would like the user to be able to call 4D commands that are unauthorized by default or plug-in commands, you must use specific methods that handle these commands.

Note: Starting with version 2004.4 of 4D, the mechanism for restricting access to commands and methods in the Formula editor can be disabled for all users (compatibility option) or for the Designer and Administrator via two corresponding options in the Preferences. If the compatibility option is checked, the SET ALLOWED METHODS command will have no effect.

Example

This example authorizes all methods starting with "formula" and the "Total_general" method in the Formula editor:

   ARRAY STRING(15;methodsArray;2)
   methodsArray{1}:="formula@"
   methodsArray{2}:="Total_general"
   SET ALLOWED METHODS(methodsArray)

See Also

EDIT FORMULA, GET ALLOWED METHODS.


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