KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Creating custom 4D View Pro Functions
PRODUCT: 4D | VERSION: 18 R5 | PLATFORM: Mac & Win
Published On: November 9, 2020

4D v18 R5 introduces a new method that allows custom functions to be added to a 4D View Pro with the VP SET CUSTOM FUNCTIONS command. The command does have some requirements to use it properly.

The command targets a specific 4D View Pro area object, and must be applied before the object is "ready" (On VP Ready). Thus the command has to be applied on the containing Form's On Load event, however this also means that new custom functions cannot be added on the fly without reloading the 4D View Pro area.

Something else to keep in mind is that only one formula object can be applied to the 4D View Pro object with the latest/last one applied taking priority replacing any prior formula objects. This does not mean that only one function can be applied, as the formula object can contain multiple functions.

To properly use the command some forsight and planning is needed, all of the required functions need to be built into a single formula object and then applied to the specific 4D View Pro area object through the containing form's On Load event.