Table Node

Overview

The Table object supports defining table-level events such as onCreate, onUpdate, and onDelete. These methods can control operations by allowing or preventing actions based on custom logic. For instance, onValidate can validate a record before insertion, while onAfterInsert is triggered post-insertion for additional operations.

Additionally, events like onSearch and onFind enable customization of foundset searches. Events such as onFoundSetLoad and onFoundsetNextChunk are useful for managing in-memory or view-based datasets.

The columns property allows for detailed configuration and interaction with the database schema.

For a broader understanding of database-level features and capabilities, refer to the Database Server documentation.

Properties Summarized

Type
Name
Summary

Events Summarized

Type
Name
Summary

void

A method that is executed after a new record is created.

void

A method that is executed after a delete operation.

void

A method that is executed after a foundset has switched to find mode.

void

A method that is executed after an insert operation.

void

A method that is executed after a search is executed for a foundset.

void

A method that is executed after an update operation.

A method that is executed before a record is created.

A method that is executed before a delete operation.

A method that is executed before a foundset is going into find mode.

A method that is executed before a foundset selection change operation.

void

A method that is executed when an in memory or viewfoundset table is first touched (by ui or scripting)

A method that can be used to load extra data in an in memory datasource.

A method that is executed before an insert operation.

A method that is executed before search() is called on a foundset in find mode.

A method that is executed before an update operation.

void

A method that is executed before an insert operation.

Properties Detailed

columns

Type Object

Events Detailed

onAfterCreate(record)

A method that is executed after a new record is created.

Parameters

Returns: void

onAfterDelete(record)

A method that is executed after a delete operation.

Parameters

Returns: void

onAfterFind()

A method that is executed after a foundset has switched to find mode.

Returns: void

onAfterInsert(record)

A method that is executed after an insert operation.

Parameters

Returns: void

onAfterSearch()

A method that is executed after a search is executed for a foundset.

Returns: void

onAfterUpdate(record)

A method that is executed after an update operation.

Parameters

Returns: void

onCreate()

A method that is executed before a record is created. The method can block the creation by returning false.

Returns: Boolean

onDelete(record)

A method that is executed before a delete operation. The method can block the delete operation by returning false.

Parameters

  • JSRecord record record that will be deleted

Returns: Boolean

onFind()

A method that is executed before a foundset is going into find mode. The method can block the mode change.

Returns: Boolean

onFoundSetBeforeSelectionChange(oldSelection, newSelection)

A method that is executed before a foundset selection change operation. The method can cancel the selection change operation by returning false.

Parameters

Returns: Boolean

onFoundSetLoad(memOrViewName)

A method that is executed when an in memory or viewfoundset table is first touched (by ui or scripting)

Parameters

  • String memOrViewName The in memory or view foundset table name that is touched.

Returns: void

onFoundsetNextChunk(inmemDataSourceName, sizeHint)

A method that can be used to load extra data in an in memory datasource.

This method id called when the inMem datasource is fully read.

Parameters

  • String inmemDataSourceName name of the inmemory datasource.

  • Number sizeHint preferred number of records to be retrieved.

Returns: JSDataSet

onInsert(record, recordMarkers, stateObject)

A method that is executed before an insert operation. The method can block the insert operation by returning false.

Parameters

  • JSRecord record record that will be inserted

  • JSRecordMarkers recordMarkers the object where all the problems can be reported against

  • Object stateObject an object that a user can give to validateRecord for extra state (optional, can be null).

Returns: Boolean

onSearch(clearLastResults, reduceSearch)

A method that is executed before search() is called on a foundset in find mode. The method can block the search (foundset will stay in find mode).

Parameters

Returns: Boolean

onUpdate(record, recordMarkers, stateObject)

A method that is executed before an update operation. A method can block the update by returning false.

Parameters

  • JSRecord record record that will be updated

  • JSRecordMarkers recordMarkers the object where all the problems can be reported against

  • Object stateObject an object that a user can give to validateRecord for extra state (optional, can be null).

Returns: Boolean

onValidate(record, recordMarkers, stateObject)

A method that is executed before an insert operation. The method can block the insert operation by returning false.

Parameters

  • JSRecord record record that must be validated

  • JSRecordMarkers recordMarkers the object where all the problems can be reported against.

  • Object stateObject an object that a user can give to validateRecord for extra state (optional, can be null).

Returns: void


Last updated