Child pages
  • The Servoy Foundset

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Often, as part of some programming operation, it is necessary to iterate over a part or all of a foundset.

There are several approaches to iterating, each having their appropriate usage. In general, a Javascript for or while statement is used to control the flow of execution.particular usage: using the foundset iterator, changing the selected index of the foundset, accessing a record object, accessing data provider values as an array.

Using the founset iterator is mostly recommended to be used since

Changing the Selected Index

...

Sometimes the purpose of iterating over a foundset is to access all of the values for a particular data provider. The most efficient way to do this is to obtain an array of values for the foundset's data provider using the the getFoundSetDataProviderAsArray method of the the databaseManager API.

Example This example shows how to access all the values in a foundset for a single data provider. Iterating over a simple array offers better performance over normal foundset iteration.

...