Skip to main content
Version: 20 R7 BETA

VP Get table dirty rows

History
ReleaseChanges
19 R8Added

VP Get table dirty rows ( vpAreaName : Text ; tableName : Text { ; reset : Boolean {; sheet : Integer }} ) : Collection

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
tableNameText->Table name
resetBoolean->True to clear the dirty status from the current table, False to keep it untouched. Default=True
sheetInteger->Sheet index (current sheet if omitted)
ResultCollection<-Collection of objects with all the items modified since the last reset

Description

The VP Get table dirty rows command returns a collection of dirty row objects, containing items that were modified since the last reset in the specified tableName.

In vpAreaName, pass the name of the 4D View Pro area.

In tableName, pass the name of the table for which you want to get the dirty rows. Only modified columns bound to a data context will be taken into account.

By default, calling the command will clear the dirty status from the current table. To keep this status untouched, pass False in the reset parameter.

In sheet, pass the index of the target sheet. If no index is specified or if you pass -1, the command applies to the current sheet.

Indexing starts at 0.

Each dirty row object in the returned collection contains the following properties:

PropertyTypeDescription
itemobjectModified object of the modified row
originalItemobjectObject before modification
rowintegerIndex of the modified row

If tableName is not found or if it does not contain a modified column, the command returns an empty collection.

Example

You want to count the number of edited rows:

var $dirty : Collection
$dirty:=VP Get table dirty rows("ViewProArea"; "ContextTable"; False)
VP SET NUM VALUE(VP Cell("ViewProArea"; 0; 0); $dirty.length)

See also

VP CREATE TABLE
VP Find table
VP SET TABLE COLUMN ATTRIBUTES
VP RESIZE TABLE