KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Accessing project methods within the Formula Editor
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: November 11, 2004
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

In 4D 2004, the Formula Editor has been updated. Functions that can be used within formulas are displayed in the List of Commands section of the editor but the project methods are not accessible within the Formula Editor unless you specifically allow it. To do this, you must use the new formula management command in program mode. The SET ALLOWED METHODS command allows you to display a method you defined and access it within the Formula Editor. This command takes an array string as parameter that contains the name of the method(s) you want to access. When executed, the designated methods will appear at the bottom of the List of Commands of the editor. The sample code below will allow access to the method ‘Calculate’ in the Formula Editor:

ARRAY TEXT(methodarray;2)
methodarray{1}:="Calculate"
methodarray{2}:="Compute"
SET ALLOWED METHODS(methodarray)