Child pages
  • JSFoundSet

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryGet all dataproviders of the foundset.Get or set the multiSelect flag of the foundset.

servoy sSummary12%30%58%height: 30px;3Methods SummaryAdd 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.voidClear 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.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 returnedGets 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 record index.Gets the relation name (null if not a related foundset).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.voidInvert the foundset against all rows of the current table.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 under the given index (add it to omit records list), to be shown with loadOmittedRecords.voidPerform Reloads all last records again with the filters applied.voidPerform 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.voidPerform 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.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.voidSet a value based on a dataprovider name.voidSet the current record index.voidSet the selected records indexes.voidSorts the foundset based on the given sort string.voidSorts the foundset based on the given sort string.voidSorts the foundset based on the given record comparator function.Create a new unrelated foundset that is a copy of the current foundset.

propertyservoy sDetail2100%height:30px2Property Detailsalldataprovidersname

alldataproviders

dessIndent
Get all dataproviders of the foundset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowmultiSelectname

multiSelect

dessIndent
Get or set the multiSelect flag of the foundset.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsaddFoundSetFilterParamname

addFoundSetFilterParam(query)

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

Filters on tables touched in the query will not be applied to the query filter.
For example, when a table filter exists on the order_details table,
a query filter with a join from orders to order_details will be applied to the foundset,
but the filter condition on the orders_details table will not be included.

Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective.
Multiple filters can be added to the same dataprovider, they will all be applied.
prs

Parameters

sIndentquerycondition to filter on.
ret

Returns

sIndent true if adding the filter succeeded, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowaddFoundSetFilterParamname

addFoundSetFilterParam(query, name)

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

Filters on tables touched in the query will not be applied to the query filter.
For example, when a table filter exists on the order_details table,
a query filter with a join from orders to order_details will be applied to the foundset,
but the filter condition on the orders_details table will not be included.

Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective.
The filter is removed again using removeFoundSetFilterParam(name).

The table of the query has to be the same as the foundset table.
prs

Parameters

sIndentquerycondition to filter on.nameString name, used to remove the filter again.
ret

Returns

sIndent true if adding the filter succeeded, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addFoundSetFilterParamname

addFoundSetFilterParam(dataprovider, operator, value)

dessIndent
Add a filter parameter that is permanent per user session to limit a specified foundset of records.
Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective.
Multiple filters can be added to the same dataprovider, they will all be applied.
prs

Parameters

sIndentdataproviderString column to filter on.operatorString operator: =, <, >, >=, <=, !=, (NOT) LIKE, (NOT) IN, (NOT) BETWEEN and IS (NOT) NULL optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null), prefix with "sql:" to allow the value to be interpreted as a custom query.valueObject filter value (for in array and between an array with 2 elements)
ret

Returns

sIndent true if adding the filter succeeded, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
addFoundSetFilterParamname

addFoundSetFilterParam(dataprovider, operator, value, name)

dessIndent
Add a filter parameter that is permanent per user session to limit a specified foundset of records.
Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective.
The filter is removed again using removeFoundSetFilterParam(name).
prs

Parameters

sIndentdataproviderString column to filter on.operatorString operator: =, <, >, >=, <=, !=, (NOT) LIKE, (NOT) IN, (NOT) BETWEEN and IS (NOT) NULL optionally augmented with modifiers "#" (ignore case) or "^||" (or-is-null)
.value, prefix with "sql:" to allow the value to be interpreted as a custom query.valueObject filter value (for in array and between an array with 2 elements)nameString name, used to remove the filter again.ret

Returns

sIndent true if adding the filter succeeded, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
clearname

clear()

dessIndent
Clear the foundset.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
deleteAllRecordscreateRecordname

deleteAllRecords

createRecord()

dessIndent
Delete all records in foundset, resulting in empty foundset
Create a new record on top of the foundset and change selection to it. Returns the new record or null if record was not created.
ret

Returns

sIndent IJSRecord the new record
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
,MobileClientsam

Sample

sIdentjavascript
lastDetailRow
deleteRecordcreateRecordname

deleteRecord

createRecord(onTop)

dessIndent
Delete
Create 
currently
a 
selected
new record
(s).
 
If
in the foundset. 
is
Returns 
in
the 
multiselect
new 
mode,
record 
all
or 
selected
null 
records
if 
are deleted.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascriptlastDetailRowdeleteRecordname

deleteRecord(record)

dessIndentDelete record from foundsetThe record to delete from the foundset
the record can't be made.
prs

Parameters

sIndent
recordonTopwhen true the new record is added as the topmost record.ret

Returns

sIndent IJSRecord of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
,MobileClientsam

Sample

sIdentjavascript
lastDetailRow
deleteRecordcreateRecordname

deleteRecord

createRecord(

index

onTop, changeSelection)

dessIndent
Delete
Create a new record 
with
in the foundset. 
given index.prs

Parameters

sIndentindexThe index of the record to delete
Returns the new record or null if the record can't be made.
prs

Parameters

sIndentonTopwhen true the new record is added as the topmost record; when false the record is added to the end, if all records are loaded, otherwise it will be added to the topchangeSelectionwhen true the selection is changed to the new record.
ret

Returns

sIndent IJSRecord of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
,MobileClientsam

Sample

sIdentjavascript
lastDetailRow
duplicateFoundSetcreateRecordname

duplicateFoundSet

createRecord(index)

dessIndent
Get
Create a 
duplicate
new record 
of
in the foundset
.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowduplicateRecordname

duplicateRecord()

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

Returns

sIndent
 and change selection to it at specified index. Returns the new record or null if the record can't be made.
prs

Parameters

sIndentindexthe new record is added at specified index (1-based).
ret

Returns

sIndent IJSRecord of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordcreateRecordname

duplicateRecord

createRecord(

onTop

index, changeSelection)

dessIndent
Duplicate
Create a 
selected
new record
, change selection to
 in the foundset. Returns the new record
.prs

Parameters

sIndentonTopwhen true the new record is added as the topmost record.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowduplicateRecordname

duplicateRecord(onTop, changeSelection)

dessIndentDuplicate selected recordwhen true
 or null if the record can't be made.
prs

Parameters

sIndent
onTopindexthe new record is added as the topmost recordat specified index (1-based).changeSelectionwhen true the selection is changed to the duplicated new record.ret

Returns

sIndentIJSRecord of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecorddeleteAllRecordsname

duplicateRecord

deleteAllRecords(

index

)

dessIndent
Duplicate
Delete 
record
all 
at
records 
index
in 
the
foundset, 
change
resulting 
selection
in 
to new record, place on top
empty foundset.
prsret

Parametersret

Returns

sIndent

Returns

sIndent
indexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value. boolean true if all records could be deleted.clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecorddeleteRecordname

duplicateRecord

deleteRecord(

index, onTop

)

dessIndent
Duplicate
Delete currently selected record
at index
(s).
If the foundset is in 
the
multiselect 
foundset
mode, 
change
all 
selection
selected 
to
records 
new
are 
record
deleted.
prsret

ParameterssIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.onTopwhen true the new record is added as the topmost record

Returns

sIndent boolean true if all records could be deleted.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
deleteRecordname

deleteRecord(record)

dessIndent
Delete record from foundset.
prs

Parameters

sIndentrecordThe record to delete from the foundset.
ret

Returns

sIndent boolean true if record could be deleted.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecorddeleteRecordname

duplicateRecord

deleteRecord(index

, onTop, changeSelection

)

dessIndent
Duplicate
Delete record 
at
with 
index
the 
in
given 
the foundset
index.
prs

Parameters

sIndentindexThe index of the record to
duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.onTopwhen true the new record is added as the topmost record.changeSelectionwhen true the selection is changed to the duplicated record.delete.ret

Returns

sIndentboolean true if record could be deleted.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecorddisposename

duplicateRecord

dispose(

index, location

)

dessIndent
Duplicate
Dispose 
record
a 
at
foundset 
index
from 
in
memory 
the
when foundset
, change selection to new record.prs

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.locationthe new record is added at specified indexret

Returns

sIndent
 is no longer needed. Should be used to destroy separate foundsets (is an optimization for memory management).
A related foundset or a foundset which is linked to visible forms/components cannot be disposed. Returns whether foundset was disposed or not.
ret

Returns

sIndent boolean foundset was disposed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordduplicateFoundSetname

duplicateRecord

duplicateFoundSet(

index, location, changeSelection

)

dessIndent
Duplicate
Get 
record
a 
at
duplicate 
index
of 
in
the foundset.
prs

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.locationthe new record is added at specified indexchangeSelectionwhen true the selection is changed to the duplicated record.
 This is a full copy of the foundset (cached pks,records, relation, filters, search criteria, omitted records, selection).
ret

Returns

sIndent foundset duplicate.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
findduplicateRecordname

find

duplicateRecord()

dessIndent
Set
Duplicate 
the
current 
foundset
record, 
in
change 
find
selection 
mode.
to 
(Start
new 
a
record, 
find
place 
request), use the "search" function to perform/exit the find. Before going into find mode, all unsaved records will be saved in the database. If this fails (due to validation failures or sql errors) or is not allowed (autosave off), the foundset will not go into find mode. Make sure the operator and the data (value) are part of the string passed to dataprovider (included inside a pair of quotation marks). Note: always make sure to check the result of the find() method. When in find mode, columns can be assigned string expressions (including operators) that are evaluated as: General: c1||c2 (condition1 or condition2) c|format (apply format on condition like 'x|dd-MM-yyyy') !c
on top.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(onTop)

dessIndent
Duplicate selected record, change selection to new record.
prs

Parameters

sIndentonTopwhen true the new record is added as the topmost record.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(onTop, changeSelection)

dessIndent
Duplicate selected record.
prs

Parameters

sIndentonTopwhen true the new record is added as the topmost record.changeSelectionwhen true the selection is changed to the duplicated record.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(index)

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

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(index, onTop)

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

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.onTopwhen true the new record is added as the topmost record.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(index, onTop, changeSelection)

dessIndent
Duplicate record at index in the foundset.
prs

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.onTopwhen true the new record is added as the topmost record.changeSelectionwhen true the selection is changed to the duplicated record.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(index, location)

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

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.locationthe new record is added at specified index
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
duplicateRecordname

duplicateRecord(index, location, changeSelection)

dessIndent
Duplicate record at index in the foundset.
prs

Parameters

sIndentindexThe index of the record to duplicate; defaults to currently selected index. Ignored if first given parameter is a boolean value.locationthe new record is added at specified indexchangeSelectionwhen true the selection is changed to the duplicated record.
ret

Returns

sIndent 0 if record was not created or the record index if it was created.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
findname

find()

dessIndent
Set the foundset in find mode. (Start a find request), use the "search" function to perform/exit the find.

Before going into find mode, all unsaved records will be saved in the database.
If this fails (due to validation failures or sql errors) or is not allowed (autosave off), the foundset will not go into find mode.
Make sure the operator and the data (value) are part of the string passed to dataprovider (included inside a pair of quotation marks).
Note: always make sure to check the result of the find() method.

When in find mode, columns can be assigned string expressions (including operators) that are evaluated as:
General:
      c1||c2    (condition1 or condition2)
      c|format  (apply format on condition like 'x|dd-MM-yyyy')
      !c        (not condition)
      #c        (modify condition, depends on column type)
      ^         (is null)
      ^=        (is null or empty)
      &lt;x     (less than value x)
      &gt;x     (greater than value x)
      &lt;=x    (less than or equals value x)
      &gt;=x    (greater than or equals value x)
      x...y     (between values x and y, including values)
      x         (
not
equals value 
condition
x)

 Number fields:
  
#c
    =x    
(modify
 
condition,
 
depends
 
on
(equals 
column
value 
type
x)
      ^
=       
(is null or zero)

 Date fields:
  
^=
    #c       (
is null or empty)
equals value x, entire day)
      now 
&lt;x
     (
less than value x
equals now, date and or time)
      
&gt;x
//     
(greater
 
than
 
value
(equals 
x
today)
      
&lt;=x
today    (
less
equals today)
than

or
 
equals
Text 
value
fields:
x)
      #c	 
&gt;=x
    
(greater
 
than
 
or
 
equals
(case 
value
insensitive 
x
condition)
      
x...y
= x      (
between
equals 
values
a 
x
space and 
y, including values
'x')
      
x
^=       
(
equals value x) Number fields:
is null or empty)
     
=x
 %x%      (
equals
contains 
value
'x')
      
^=
%x_y%    (
is
contains 
null
'x' 
or
followed 
zero)
by any char 
Date fields:
and 'y')
      
#c
\%      
(
equals
contains 
value x, entire day
char '%')
      
now
\_      (
equals
contains 
now, date and or time
char '_')

Related columns can be assigned, 
//
they will result in related searches.
For 
(equals today) today (equals today) Text fields: #c (case insensitive condition) = x (equals a space and 'x') ^= (is null or empty) %x% (contains 'x') %x_y% (contains 'x' followed by any char and 'y') \% (contains char '%') \_ (contains char '_') Related columns can be assigned, they will result in related searches. For example, "employees_to_department.location_id = headoffice" finds all employees in the specified location). Searching on related aggregates is supported. For example, "orders_to_details.total_amount = '&gt;1000'" finds all orders with total order details amount more than 1000. Arrays can be used for searching a number of values, this will result in an 'IN' condition that will be used in the search. The values are not restricted to strings but can be any type that matches the column type. For example, "record.department_id = [1, 33, 99]"ret

Returns

sIndent
example, "employees_to_department.location_id = headoffice" finds all employees in the specified location).

Searching on related aggregates is supported.
For example, "orders_to_details.total_amount = '&gt;1000'" finds all orders with total order details amount more than 1000.

Arrays can be used for searching a number of values, this will result in an 'IN' condition that will be used in the search.
The values are not restricted to strings but can be any type that matches the column type.
For example, "record.department_id = [1, 33, 99]"
ret

Returns

sIndent true if the foundset is now in find mode, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
forEachname

forEach(callback)

dessIndent
Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time.
It will dynamically load all records in the foundset (using Servoy lazy loading mechanism). If callback function returns a non null value the traversal will be stopped and that value is returned.
If no value is returned all records of the foundset will be traversed. Foundset modifications( like sort, omit...) cannot be performed in the callback function.
If foundset is modified an exception will be thrown. This exception will also happen if a refresh happens because of a rollback call for records on this datasource when iterating.
When an exception is thrown from the callback function, the iteraion over the foundset will be stopped.
prs

Parameters

sIndentcallbackThe callback function to be called for each loaded record in the foundset. Can receive three parameters: the record to be processed, the index of the record in the foundset, and the foundset that is traversed.
ret

Returns

sIndent Object the return value of the callback
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
,MobileClientsam

Sample

sIdentjavascript
lastDetailRow
forEachname

forEach(callback, thisObject)

dessIndent
Iterates over the records of a foundset taking into account inserts and deletes that may happen at the same time.
It will dynamically load all records in the foundset (using Servoy lazy loading mechanism). If callback function returns a non null value the traversal will be stopped and that value is returned.
If no value is returned all records of the foundset will be traversed. Foundset modifications( like sort, omit...)
cannot be performed in
 cannot be performed in the callback function.
If foundset is modified an exception will be thrown. This exception will also happen if a refresh happens because of a rollback call for records on this datasource when iterating.
When an exception is thrown from the callback function
.
, 
If
the 
foundset
iteraion 
is
over 
modified
the 
an exception
foundset will be 
thrown. This exception will also happen if a refresh happens because of a rollback call for records on this datasource when iterating. When an exception is thrown from the callback function, the iteraion over the foundset will be stopped.prs

Parameters

sIndentcallbackThe callback function to be called for each loaded record in the foundset. Can receive three parameters: the record to be processed, the index of the record in the foundset, and the foundset that is traversed.ret

Returns

sIndent
stopped.
prs

Parameters

sIndentcallbackThe callback function to be called for each loaded record in the foundset. Can receive three parameters: the record to be processed, the index of the record in the foundset, and the foundset that is traversed.thisObjectWhat the this object should be in the callback function (default it is the foundset)
ret

Returns

sIndent Object the return value of the callback
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentSortname

getCurrentSort()

dessIndent
Get the current sort columns.
ret

Returns

sIndent String sort columns
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataProviderValuename

getDataProviderValue(dataProviderID)

dessIndent
Get a value based on a dataprovider name.
prs

Parameters

sIndentdataProviderIDdata provider name
ret

Returns

sIndent Object value
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataSourcename

getDataSource()

dessIndent
Get the datasource used.
The datasource is an url that describes the data source.
ret

Returns

sIndent String data source.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
forEachgetFoundSetFilterParamsname

forEach

getFoundSetFilterParams(

callback, thisObject

)

dessIndent
Iterates
Get 
over
the 
records
list of 
a foundset taking into account inserts and deletes that may happen at the same time. It will dynamically load all records in the foundset (using Servoy lazy loading mechanism). If callback function returns a non null value the traversal will be stopped and that value is returned. If no value is returned all records of the foundset will be traversed. Foundset modifications( like sort, omit...) cannot be performed in the callback function. If foundset is modified an exception will be thrown. This exception will also happen if a refresh happens because of a rollback call for records on this datasource when iterating. When an exception is thrown from the callback function, the iteraion over the foundset will be stopped.prs

Parameters

sIndentcallbackThe callback function to be called for each loaded record in the foundset. Can receive three parameters: the record to be processed, the index of the record in the foundset, and the foundset that is traversed.thisObjectWhat the this object should be in the callback function (default it is the foundset)ret

Returns

sIndent
previously defined foundset filters.

For column-based table filters, a row of 5 fields per filter are returned.
The "columns" of a row from this array are: tablename, dataprovider, operator, value, filtername

For query-based filters, a row of 2 fields per filter are returned.
The "columns" of a row from this array are: query, filtername
ret

Returns

sIndent Array of filter definitions.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getFoundSetFilterParamsname

getFoundSetFilterParams(filterName)

dessIndent
Get a previously defined foundset filter, using its given name.
The result is an array of:
 [ tableName, dataprovider, operator, value, name ]
prs

Parameters

sIndentfilterNamename of the filter to retrieve.
ret

Returns

sIndent Array of filter definitions.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentSortgetNamename

getCurrentSort

getName()

dessIndent
Get
the current sort columns
 foundset name. If foundset is not named foundset or related foundset will return null.
ret

Returns

sIndentsIndent name.clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataProviderValuegetOmittedPKsname

getDataProviderValue

getOmittedPKs(

dataProviderID

)

dessIndent
Get
Returns a
value based on a dataprovider name.prs

Parameters

sIndentdataProviderIDdata provider name
 JSDataSet with the PKs omitted on this foundset
If no PKs have been omitted, an empty JSDataSet will be returned
ret

Returns

sIndent a JSDataSet
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataSourcegetParentRecordsname

getDataSource

getParentRecords()

dessIndent
Get the datasource used.
The datasource is an url that describes the data source.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowgetFoundSetFilterParamsname

getFoundSetFilterParams()

dessIndent
Get the list of previously defined foundset filters.

For column-based table filters, a row of 5 fields per filter are returned.
The "columns" of a row from this array are: tablename, dataprovider, operator, value, filtername

For query-based filters, a row of 2 fields per filter are returned.
The "columns" of a row from this array are: query, filtername
ret

Returns

sIndent
Gets the parent records when called on a related foundset. (empty array if not a related foundset)
Depending on the cardinality of the relation, this method returns either 1 or more records.
This can be useful when creating a new record in an empty related foundset and some data from the parent record(s) is needed.

Be aware that if datasources.xxx.getFoundset() is called multiple times on the same datasource it creates multiple foundset instances
then the related foundset can have multiple references to the same parent record but in different foundsets.
(different instances of the record for the same row in the database)
In that case, this method will return the record from the first foundset.
ret

Returns

sIndent an array of records
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getFoundSetFilterParamsgetQueryname

getFoundSetFilterParams

getQuery(

filterName

)

dessIndent
Get the query that the foundset is currently using (as a
previously defined foundset filter, using its given name. The result is an array of: [ tableName, dataprovider, operator, value, name ]prs

Parameters

sIndentfilterNamename of the filter to retrieve.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowgetOmittedPKsname

getOmittedPKs()

dessIndentReturns a JSDataSet with the PKs omitted on this foundset If no PKs have been omitted, an empty JSDataSet will be returned
 clone; modifying this QBSelect will not automatically change the foundset).
When the foundset is in find mode, the find conditions are included in the resulting query.
So the query that would be used when just calling search() (or search(true,true)) is returned.
Note that foundset filters are optionally included and table filters are not included in the query.
ret

Returns

sIndent query.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getQueryname

getQuery(includeFilters)

dessIndent
Get the query that the foundset is currently using (as a clone; modifying this QBSelect will not automatically change the foundset).
When the 
founset
foundset is in find mode, the find conditions are included in the resulting query.
So the query that would be used when just calling search() (or search(true,true)) is returned.
Note that foundset filters are optionally included and table filters are not included in the query.
prs

Parameters

sIndentincludeFiltersinclude the foundset filters, default true.
ret

Returns

sIndent query.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getRecordname

getRecord(index)

dessIndent
Get the record object at the given index.
Argument "index" is 1 based (so first record is 1).
prs

Parameters

sIndentindexrecord index (1 based).
ret

Returns

sIndent Record record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getRecordIndexname

getRecordIndex(record)

dessIndent
Get the record index. Will return -1 if the record can't be found.
prs

Parameters

sIndentrecordRecord
ret

Returns

sIndent int index.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getRelationNamename

getRelationName()

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

Returns

sIndent String relation name when related.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSelectedIndexname

getSelectedIndex()

dessIndent
Get the current record index of the foundset.
ret

Returns

sIndent int current index (1-based)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getSelectedIndexesname

getSelectedIndexes()

dessIndent
Get the indexes of the selected records.
When the founset is in multiSelect mode (see property multiSelect), a selection can consist of more than one index.
ret

Returns

sIndent Array current indexes (1-based)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSelectedRecordname

getSelectedRecord()

dessIndent
Get the selected record.
ret

Returns

sIndent Record record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getSelectedRecordsname

getSelectedRecords()

dessIndent
Get the selected records.
When the founset is in multiSelect mode (see property multiSelect), selection can be a more than 1 record.
ret

Returns

sIndent Array current records.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSizename

getSize()

dessIndent
Get the number of records in this foundset.
This is the number of records loaded, note that when looping over a foundset, size() may
increase as more records are loaded.
ret

Returns

sIndent int current size.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
hasConditionsname

hasConditions()

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

Returns

sIndent wether the foundset has find-conditions
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
invertRecordsname

invertRecords()

dessIndent
Invert the foundset against all rows of the current table.
All records that are not in the foundset will become the current foundset.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isInFindname

isInFind()

dessIndent
Check if this foundset is in find mode.
ret

Returns

sIndent boolean is in find mode.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
loadAllRecordsname

loadAllRecords()

dessIndent
Loads all accessible records from the datasource into the foundset.
Filters on the foundset are applied.

Before loading the records, all unsaved records will be saved in the database.
If this fails (due to validation failures or sql errors) or is not allowed (autosave off),
records will not be loaded,
ret

Returns

sIndent true if records are loaded, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
loadOmittedRecordsname

loadOmittedRecords()

dessIndent
Loads the records that are currently omitted as a foundset.

Before loading the omitted records, all unsaved records will be saved in the database.
If this fails (due to validation failures or sql errors) or is not allowed (autosave off),
omitted records will not be loaded,
ret

Returns

sIndent

sIndent true if records are loaded, false otherwise.clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords()

dessIndent
Reloads all last (related) records again, if, for example, after search in tabpanel.
When in find mode, this will reload the records from before the find() call.
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(foundset)

dessIndent
Copies foundset data from another foundset.
This will alter the foundset state to the state of the foundset that is given.
If you really just want to use the given foundset on the form itself, then you need to use controller.loadRecords(foundset)
that will change the instance of the foundset that is used for this form. Not just update an existing forms 
form
foundset.

If you copy over a relation into this foundset, then this foundset will not be a related foundset, it will not automatically update its state
of records are updated or added that belong to that relation. It will only be
a snapshot of that related foundsets state. Foundset filter params are copied over from the source foundset and are merged with the existing filters on this foundset.
 a snapshot of that related foundsets state.

Foundset filter params are copied over from the original/source foundset and are merged with the existing filters on this foundset.
So if the original foundset had filters and the given foundset has filters then the resulting foundset will have all the filters of both,
If you don't want this and you really want only the state of the given foundset, use controller.loadRecords(fs) instead of foundset.loadRecords(fs)
prs

Parameters

sIndentfoundsetThe foundset to load records from
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(dataset)

dessIndent
Loads a primary key dataset, will remove related sort. Tries to preserve selection based on primary key, otherwise first record is selected.
prs

Parameters

sIndentdatasetpkdataset
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(querybuilder)

dessIndent
Loads records into form foundset based on a query builder object (also known as 'Form by query').
When the 
founset
foundset is in find mode, the find states are discarded, the foundset will go out of find mode and the foundset will be loaded using the query.
If the foundset is related, the relation-condition will be added to the query.
Tries to preserve selection based on primary key, otherwise first record is selected.
prs

Parameters

sIndentquerybuilderthe query builder
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(uuidpk)

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

NOTE: This function will return true if the foundset was altered/changed. It is up to the developer to check for the presence of actual data using getSize().
prs

Parameters

sIndentuuidpksingle-column pk value
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(numberpk)

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

NOTE: This function will return true if the foundset was altered/changed. It is up to the developer to check for the presence of actual data using getSize().
prs

Parameters

sIndentnumberpksingle-column pk value
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(queryString)

dessIndent
Loads records into form foundset based on a query (also known as 'Form by query'). The query must be a valid sql select.
If the foundset is related this function is not allowed.
Tries to preserve selection based on primary key, otherwise first record is selected.

see foundset.loadRecords(QBSelect).

When possible, the foundset will be loaded with the given query.
This is not always possible because the foundset needs to manipulate the query when adding conditions and joins.
In that case the query will be wrapped: select pk from tab where pk = (queryString)
The result is the same, except for the ordering in the queryString which will be ignored.

The query will be wrapped when one of the following is true:
<ul>
<li>you have no order-by clause</li>
<li>you have no from keyword</li>
<li>your query is not fully qualified on the main table</li>
<li>you have a group-by, having, join or union keyword</li>
</ul>
prs

Parameters

sIndentqueryStringselect statement
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loadRecordsname

loadRecords(queryString, argumentsArray)

dessIndent
Loads records into form foundset based on a query (also known as 'Form by query'). The query must be a valid sql select.
If the foundset is related this function is not allowed.
Tries to preserve selection based on primary key, otherwise first record is selected.

see foundset.loadRecords(QBSelect).

When possible, the foundset will be loaded with the given query.
This is not always possible because the foundset needs to manipulate the query when adding conditions and joins.
In that case the query will be wrapped: select pk from tab where pk = (queryString)
The result is the same, except for the ordering in the queryString which will be ignored.

The query will be wrapped when one of the following is true:
<ul>
<li>you have no order-by clause</li>
<li>you have no from keyword</li>
<li>your query is not fully qualified on the main table</li>
<li>you have a group-by, having, join or union keyword</li>
</ul>
prs

Parameters

sIndentqueryStringselect statementargumentsArrayarguments to query
ret

Returns

sIndent true if successful
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
newRecordname

newRecord()

dessIndent
Create a new record on top of the foundset and change selection to it. Returns -1 if the record can't be made.
ret

Returns

sIndent int index of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
newRecordname

newRecord(onTop)

dessIndent
Create a new record in the foundset and change selection to it. Returns -1 if the record can't be made.
prs

Parameters

sIndentonTopwhen true the new record is added as the topmost record.
ret

Returns

sIndent int index of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
newRecordname

newRecord(onTop, changeSelection)

dessIndent
Create a new record in the foundset. Returns -1 if the record can't be made.
prs

Parameters

sIndentonTopwhen true the new record is added as the topmost record; when false the record is added to the end, if all records are loaded, otherwise it will be added to the topchangeSelectionwhen true the selection is changed to the new record.
ret

Returns

sIndent int index of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
newRecordname

newRecord(index)

dessIndent
Create a new record in the foundset and change selection to it. Returns -1 if the record can't be made.
prs

Parameters

sIndentindexthe new record is added at specified index.
ret

Returns

sIndentsIndent int index of new record.clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
newRecordname

newRecord(index, changeSelection)

dessIndent
Create a new record in the foundset. Returns -1 if the record can't be made.
prs

Parameters

sIndentindexthe new record is added at specified index.changeSelectionwhen true the selection is changed to the new record.
ret

Returns

sIndent int index of new record.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
omitRecordname

omitRecord()

dessIndent
Omit selected record(s) (add it to omit records list), to be shown with loadOmittedRecords. T
his operation returns false only when foundset is in bad state (table not accessible or not having a valid selected record)
or the record is in an edit state and can't be saved (autosave is false).

Note: The omitted records list is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords()
ret

Returns

sIndent boolean true if all selected record(s) could be omitted.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
omitRecordname

omitRecord(index)

dessIndent
Omit record under the given index (add it to omit records list), to be shown with loadOmittedRecords. If index is null it behaves just like omitRecord().
This operation returns false when index is invalid (should be between 1 and foundset size) or foundset is in bad state (its table not accessible)
or the record is in an edit state and can't be saved (autosave is false). Any retrievable record can be ommitted.

Note: The omitted records list is discarded when these functions are executed: loadAllRecords, loadRecords(dataset), loadRecords(sqlstring), invertRecords()
prs

Parameters

sIndentindexThe index of the record to omit, starting with 1 .
ret

Returns

sIndent boolean true if all records could be omitted.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
reloadWithFiltersname

reloadWithFilters()

dessIndent
Reloads all last records again with the filters applied.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
relookupname

relookup()

dessIndent
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.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
relookupname

relookup(index)

dessIndent
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.
prs

Parameters

sIndentindexrecord index (1-based)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeFoundSetFilterParamname

removeFoundSetFilterParam(name)

dessIndent
Remove a named foundset filter.
Use clear(), reloadWithFilters(), loadRecords() or loadAllRecords() to make the filter effective.
prs

Parameters

sIndentnameString filter name.
ret

Returns

sIndent true if removing the filter succeeded, false otherwise.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
searchname

search()

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

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.
ret

Returns

sIndent the recordCount
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
searchname

search(clearLastResults)

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

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.
prs

Parameters

sIndentclearLastResultsboolean, clear previous search, default true
ret

Returns

sIndent the recordCount
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
searchname

search(clearLastResults, reduceSearch)

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

Note: Omitted records are automatically excluded when performing a search - meaning that the foundset result by default will not include omitted records.
prs

Parameters

sIndentclearLastResultsboolean, clear previous search, default truereduceSearchboolean, reduce (true) or extend (false) previous search results, default true
ret

Returns

sIndent the recordCount
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
selectRecordname

selectRecord(pkid1, pkid2, pkidn)

dessIndent
Select the record based on pk data.
Note that if the foundset has not loaded the record with the pk, selectrecord will fail.

In case of a table with a composite key, the pk sequence must match the alphabetical
ordering of the pk column names.
prs

Parameters

sIndentpkid1primary keypkid2second primary key (in case of composite primary key)pkidnnth primary key
ret

Returns

sIndent true if succeeded.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDataProviderValuename

setDataProviderValue(dataProviderID, value)

dessIndent
Set a value based on a dataprovider name.
prs

Parameters

sIndentdataProviderIDdata provider namevaluevalue to set
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setSelectedIndexname

setSelectedIndex(index)

dessIndent
Set the current record index.
prs

Parameters

sIndentindexindex to set (1-based)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
setSelectedIndexesname

setSelectedIndexes(indexes)

dessIndent
Set the selected records indexes.
prs

Parameters

sIndentindexesAn array with indexes to set.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortname

sort(sortString)

dessIndent
Sorts the foundset based on the given sort string.
Tries to preserve selection based on primary key. If first record is selected or cannot select old record it will select first record after sort.
TIP: You can use the Copy button in the developer Select Sorting Fields dialog to get the needed syntax string for the desired sort fields/order.
prs

Parameters

sIndentsortStringthe specified columns (and sort order)
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortname

sort(sortString, defer)

dessIndent
Sorts the foundset based on the given sort string.
Tries to preserve selection based on primary key. If first record is selected or cannot select old record it will select first record after sort.
TIP: You can use the Copy button in the developer Select Sorting Fields dialog to get the needed syntax string for the desired sort fields/order.
prs

Parameters

sIndentsortStringthe specified columns (and sort order)deferwhen true, the "sortString" will be just stored, without performing a query on the database (the actual sorting will be deferred until the next data loading action).
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortname

sort(recordComparisonFunction)

dessIndent
Sorts the foundset based on the given record comparator function.
Tries to preserve selection based on primary key. If first record is selected or cannot select old record it will select first record after sort.
The comparator function is called to compare
two records, that are passed as arguments, and
it will return -1/0/1 if the first record is less/equal/greater
then the second record.

The function based sorting does not work with printing.
It is just a temporary in-memory sort.

NOTE: starting with 7.2 release this function doesn't save the data anymore
prs

Parameters

sIndentrecordComparisonFunctionrecord comparator function
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
unrelatename

unrelate()

dessIndent
Create a new unrelated foundset that is a copy of the current foundset.
If the current foundset is not related, no copy will made.
ret

Returns

sIndent FoundSet unrelated foundset.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow