The seven global formulas are configured in System Settings and run in the shared global MathParser. They have no common event arguments. All seven use NeedResult=False; any value assigned to Result is ignored and cannot allow, cancel or retry the related operation.
The normal lifecycle executor clears the current object before running InitFormula, AfterInitFormula, LoginFormula, LogoutFormula and DeInitFormula. UpdateFormula and SchedulerExecErrorFormula use their own execution paths, described below. A formula error is reported but does not stop the surrounding lifecycle operation.
Contents: InitFormula · AfterInitFormula · LoginFormula · UpdateFormula · LogoutFormula · DeInitFormula · SchedulerExecErrorFormula
Execution: Runs very early, immediately after global variables and the global formulas themselves have been loaded. File data, select lists, units, entries, reasons, objects, filters, statistics, graphs, DBForms and the other global containers are not loaded yet.
Availability: Desktop, update server, Windows service and web. It is not guaranteed to run only once: a full desktop structure reload can execute it again, and web initialization can execute it for both the server instance and individual sessions.
Arguments and Result: No event-specific arguments. Result is ignored.
Example: Record that the early initialization point has been reached without depending on containers that are still unavailable.
CIP_SetRuntimeVariable("GlobalInitReached", True);Execution: Runs after the global containers have been loaded, but before GlobalObjects.BatchInitObjects and before the ObjectRef cache is loaded. Despite its name, it is therefore not the final initialization step.
Availability: All initialization modes. Like InitFormula, it can run again during a desktop structure reload and during server and session initialization on web.
Arguments and Result: No event-specific arguments. Result is ignored. A formula error does not make the surrounding after-initialization operation fail.
Example: Mark that container loading has completed.
CIP_SetRuntimeVariable("AfterInitReached", True);Execution: Runs after successful authentication and global initialization. On desktop it runs after the after-initialization steps, theme and language restoration, but before the main window is initialized. On web it runs once during the first initialization of a main-form instance.
Availability: Desktop and web.
Arguments and Result: No event-specific arguments. Result is ignored and cannot block login.
Example: Store the authenticated user name for later scripts.
CIP_SetRuntimeVariable("LoggedInUser", CIP_GetUserName());Execution: This is not a general periodic update event. It runs only when the database value of GLOBAL_USER_NOTIFY_VALUE differs from the local value.
Context: In the main desktop application, the parser's current object can be the object of the active MDI window. In update server and Windows service modes it is nil. Do not write a formula that requires a current object unless it is restricted to the desktop client.
Availability: Main desktop application, update server and update Windows service. It does not run in web-server mode.
Arguments and Result: No event-specific arguments. Result is ignored. Even if the formula fails, the local notification counter is updated, so the same change is not retried automatically.
Example: Record that the latest user-notification change was handled.
CIP_SetRuntimeVariable("UserNotifyHandled", Now());Execution: Runs through the desktop DoLogout path. A menu logout closes all windows first. During application shutdown, however, the formula runs before the window-closing check; it can therefore run even if a window later prevents shutdown.
Availability: Desktop only. The web logout path does not call this formula.
Arguments and Result: No event-specific arguments. Result is ignored and cannot cancel logout.
Example: Clear session-specific state created by the login formula.
CIP_DeleteRuntimeVariable("LoggedInUser");Execution: Runs after the background thread is stopped and the timer is disabled, but before user parameters are saved, database connections are closed and global containers are cleared. Cleanup can therefore still use most global data.
Availability: Desktop logout or application shutdown, server or service shutdown, and shutdown of a web session's global instance.
Arguments and Result: No event-specific arguments. Result is ignored.
Example: Remove initialization state before the global containers are released.
CIP_DeleteRuntimeVariable("GlobalInitReached");
CIP_DeleteRuntimeVariable("AfterInitReached");Execution: Runs only when scheduler execution finishes with a non-empty accumulated error message.
Arguments: Argument_ErrorMessage contains the complete accumulated scheduler error text. The System Settings editor registers this argument and it is populated at runtime, but it is missing from the formula's stored VarList metadata. Its value is not removed from the shared global parser after execution and can remain visible to later global formulas; those formulas must not rely on such a stale value.
Result: Ignored. An error in this error-handler formula only produces another error message.
Example: Preserve the last scheduler error for later inspection.
CIP_SetRuntimeVariable("LastSchedulerError", Argument_ErrorMessage);