GetNextModified

Description

Reports the next row that has been modified in the specified buffer.

Applies to

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object, DataStore object

Web

Client control

Web ActiveX

DataWindow control, DataWindowChild object

Syntax

PowerBuilder

long dwcontrol.GetNextModified (long row, DWBuffer dwbuffer )

Web DataWindow client control

number dwcontrol.GetNextModified (number row, number column )

Web ActiveX

number dwcontrol.GetNextModified (number row, number dwbuffer )

Argument

Description

dwcontrol

A name of the DataWindow control, DataStore, or child DataWindow in which you want to locate the modified row.

row

A value identifying the row location after which you want to locate the modified row. To search from the beginning, specify 0.

dwbuffer

A value of the dwBuffer enumerated datatype (PowerBuilder) or an integer (Web ActiveX) identifying the DataWindow buffer in which you want to locate the modified row. For a list of valid values, see DWBuffer.

Returns

Returns the number of the first row that was modified after row in dwbuffer in dwcontrol. Returns 0 if there are no modified rows after the specified row.

If any argument value is null, in PowerBuilder and JavaScript the method returns null.

Usage

PowerBuilder stores the update status of rows and columns in the DataWindow. The status settings indicate whether a row or column is new or has been modified. GetNextModified reports rows with the status NewModified! and DataModified!.

For more information on the status of rows and columns, see GetItemStatus and SetItemStatus.

Using GetNextModified on the delete buffer will return rows that have been modified and then deleted. The DeletedCount method will report the total number of deleted rows.

GetNextModified begins searching in the row after the value you specify in row. This is different from the behavior of Find, FindGroupChange, and FindRequired, which begin searching in the row you specify.


Web DataWindow

GetNextModified finds changed rows only on the current page. The result set for the DataWindow can include rows that are on the server but not displayed in the browser. GetNextModified cannot find changed rows that are on the server but not on the client’s current page.

NoteTotal number of modified rows You can use the ModifiedCount method to find out the total number of modified rows in the primary and filter buffers.

Examples

Example 1

These statements count the number or rows that were modified in the primary buffer for dw_status and then display a message reporting the number modified:

integer rc

long NbrRows, ll_row = 0, count = 0


dw_status.AcceptText()

NbrRows = dw_status.RowCount()

DO WHILE ll_row <= NbrRows

		ll_row = dw_status.GetNextModified(ll_row, Primary!)

		IF ll_row > 0 THEN

			count = count + 1

		ELSE

			ll_row = NbrRows + 1

		END IF

LOOP

MessageBox("Modified Count", &

		String(count) &

		+ " rows were modified.")

See also