JSFoundSet

Overview

FoundSet serves as the data model for UI components or forms directly linked to a datasource, enabling data manipulation and validation. It supports common operations like sorting, query-based loading, and lazy loading, with features for relation handling and batch data management.

Functionality

FoundSet allows filtering, creating, duplicating, or deleting records with a robust API for data management. Filters can be applied via query builders or column-based conditions and can be removed dynamically. Sorting can be done with predefined strings, deferred execution, or custom comparator functions.

Developers can retrieve the current state of the foundset, including active filters, query parameters, and loaded record indices. FoundSet's structure supports direct interaction with parent or related records, dynamic loading of omitted records, and navigation using indices or primary keys.

FoundSet also offers functionality for find/search operations using SQL-like conditions. It integrates with server-side data sources for data synchronization, enabling a balance of client-side and server-side performance optimization.

Extends

JSFoundSet

Properties Summarized

Type
Name
Summary

Get all dataproviders of the foundset.

Get or set the multiSelect flag of the foundset.

Methods Summarized

Type
Name
Summary

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

Add a filter parameter that is permanent per user session to limit a specified foundset of records.

void

Clear the foundset.

Create a new record on top of the foundset and change selection to it.

Create a new record in the foundset.

Create a new record in the foundset.

Create a new record in the foundset and change selection to it at specified index.

Create a new record in the foundset.

Create a table filter that can be applied to the foundset.

Delete all records in foundset, resulting in empty foundset.

Delete currently selected record(s).

Delete record from foundset.

Delete record with the given index.

Dispose a foundset from memory when foundset is no longer needed.

Get a duplicate of the foundset.

Duplicate current record, change selection to new record, place on top.

Duplicate selected record, change selection to new record.

Duplicate selected record.

Duplicate record at index in the foundset, change selection to new record, place on top.

Duplicate record at index in the foundset, change selection to new record.

Duplicate record at index in the foundset.

Duplicate record at index in the foundset, change selection to new record.

Duplicate record at index in the foundset.

Set the foundset in find mode.

Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time.

Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time.

Get the current sort columns.

Get a value based on a dataprovider name.

Get the datasource used.

Get the list of previously defined foundset filters.

Get a previously defined foundset filter, using its given name.

Get foundset name.

Returns a JSDataSet with the PKs omitted on this foundset If no PKs have been omitted, an empty JSDataSet will be returned

Gets the parent records when called on a related foundset.

Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset).

Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset).

Get the record object at the given index.

Get the loaded record based on its primary key values.

Get the record index.

Get the index of a record object inside a foundset

Gets the relation name (null if not a related foundset).

Returns the internal SQL of the JSFoundset.

Returns the internal SQL of the JSFoundset.

Returns the parameters for the internal SQL of the QBSelect.

Returns the parameters for the internal SQL of the QBSelect.

Get the current record index of the foundset.

Get the indexes of the selected records.

Get the selected record.

Get the selected records.

Get the number of records in this foundset.

Check wether the foundset has any conditions from a previous find action.

void

Invert the foundset against all rows of the current table.

Returns a boolean if this foundset is in a cleared state (has the clear condition that is added by a clear() call)

Check if the foundset was disposed.

Check if this foundset is in find mode.

Loads all accessible records from the datasource into the foundset.

Loads the records that are currently omitted as a foundset.

Reloads all last (related) records again, if, for example, after search in tabpanel.

Copies foundset data from another foundset.

Loads a primary key dataset, will remove related sort.

Loads records into form foundset based on a query builder object (also known as 'Form by query').

Loads a single record by primary key, will remove related sort.

Loads a single record by primary key, will remove related sort.

Loads records into form foundset based on a query (also known as 'Form by query').

Loads records into form foundset based on a query (also known as 'Form by query').

Create a new record on top of the foundset and change selection to it.

Create a new record in the foundset and change selection to it.

Create a new record in the foundset.

Create a new record in the foundset and change selection to it.

Create a new record in the foundset.

Omit selected record(s) (add it to omit records list), to be shown with loadOmittedRecords.

Omit record sent as parameter (add it to omit records list), to be shown with loadOmittedRecords.

Omit record under the given index (add it to omit records list), to be shown with loadOmittedRecords.

void

Reloads all last records again with the filters applied.

void

Perform a relookup for the currently selected records Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation.

void

Perform a relookup for the record under the given index Lookups are defined in the dataprovider (columns) auto-enter setting and are normally performed over a relation upon record creation.

Remove a named foundset filter.

void

Reverts outstanding (not saved) in memory changes from edited records of this foundset.

Saves all outstanding (unsaved) data of this foundset and exits the current record.

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Start the database search and use the results, returns the number of records, make sure you did "find" function first.

Select the record based on pk data.

void

Set a value based on a dataprovider name.

Set multiple foundset filters at the same time.

void

Set the current record index.

void

Set the selected records indexes.

void