Public Method

A Public Method may be called from any other Procedure, by the Default plug-in as part of the CMS.

In large systems, Public Methods or Includes should be used whenever possible, such that Message Handlers, the Frontend Procedures, and Backend Procedures of Table Actions, Table Reports, Record Actions, and Record Reports are all able to call the Public Method when needed: if the same source code was instead placed directly inside another Procedure Type, it would not be accessible from other locations.

Parameters and Queries

The Parameters list of a Public Method may be one of the following prototypes:

Calling a Public Method

In order to call a Public Method elsewhere in MOX, the full dotted Database path name of the Table plus a dot-ProcName should be used: eg MemTab.Person.MyProc. Parameters should be listed following the same rules as any other statement/command in MOX.

The Call command allows the name of the Public Method being called to be dynamic by making the name of the public method the first parameter of the Call command.

The Thread command works the same as the Call command, but starts the Public Method in a new thread. When used for threads, the Public Method may only use specific Input Parameters; Input Queries and Output Queries are not supported.

Frontend Calls from the CMS

Default.dll contains the CMS and the Admin interface. They call Public Methods in the Content database tables to facilitate dynamic website content. For example, when the CMS is creating the Home page, which is stored in a record with the Alias of Home in the Content.Category Table, it attempts to run the Procedure named Home in the Content.Category Table.

These Public Methods must have a Parameters list set to *, and the CMS will pass the record of the user who is currently logged in as the Input Query.

The Search feature of the CMS can be customized by creating a Public Method in the Content.Category Table named Search.

Request Query

A Query named Request will in most cases be created and populated with the HTTP(S) request data. Any changes made to this data will be discarded. The complete list of Request Query contents can be found under the headings of Builtin Values, Request Query on the Syntax and Buildin Values page.