Server Data Objects

New in package 166

Data objects

The Server uses Database.query to load and manipulate data objects. Data objects can be extended with other data objects and queries enumerating other data objects.

The examples below use a Customers shortcut for Database.query('Customers').

Creating new objects

For example, here's how the Server could create a new 'Customer' object and add it to the database:

Loading existing objects

For example, here's how the Server could load an existing 'Customer' object:

Updating objects

For example, here's how the Server could update an existing 'Customer' object:

Main object

A main object is a data object corresponding to an object edited on the Form and extended example, here's how the Server could update an existing 'Customer' object:

Extending

You can extend the objects loaded by the Server in the Database.query and Server event listeners.

Example

The code below extends any loaded or created 'Customers' object with the corresponding 'Jobs'. The code should appear in the Server-Side Global MetaScript:

If rather than extending all the 'Customers' you prefer to extend the main object only, it can be done in the [Server 'objectSet' event]. The code should appear in the Server-Side Global MetaScript for a 'Customer' form:

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.