Salesforce

DbViewSize (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

DbViewSize (Magic xpa 4.x)

Retrieves the number of records in the current data view.

Syntax:

DbViewSize(generation)

Parameters:

generation – A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.

Returns:

A numeric value that represents the number of cached records.

Note:

If no main source is defined, the function returns 0.

If the view is preloaded, the function will return the number of records of the entire view.

Until version 3.3, if the Preload View property was set to False, the function returned 0.

As of version 3.3, in the following cases, the number of records in the range is known so when evaluating the function, there will not be access to the database:

  • Preload View = True.

  • All the data was already loaded (such as after scrolling in the table until reaching the last record).

  • The table is defined with Scroll bar Thumb = Absolute.

When the Preload View property is set to False, the function will return 0 for Local, ISAM and Space databases, and when a Direct SQL, a Magic Range expression or a range on a variable from a link is used (since these ranges are done on the client after fetching the records from the database and the function does not fetch the records themselves).

Exceptions:

This function is not supported for Web Service databases.

See also:

DbViewRowIdx

How Do I Determine the Bulk Size When Fetching Records from a Database Table?

The Online and Rich Client Samples projects (program DV01 and RDV01)

Reference
Attachment 
Attachment