Syntax for data in a block of rows and columns – PB Docs 126

Syntax for data in a block of rows and columns


A DataWindow data expression accesses data in a range of rows
and columns when you specify the starting and ending row and column





The name of the DataWindow control or
child DataWindow in which you want to get or set data.


The name of the buffer from which you
want to get or set data. Values are:

  • Primary – (Default)
    The data in the primary buffer (the data that has not been deleted
    or filtered out).

  • Delete – The data in the delete buffer
    (data deleted from the DataWindow control).

  • Filter – The data in the filter buffer
    (data that was filtered out).


The source of the data. Values are:

  • Current – (Default)
    The current values in the DataWindow control.

  • Original – The values that were initially
    retrieved from the database.


The number of the first row in the desired
range of rows.


The number for the first column in the


The number of the last row in the range.


The number for the last column in the

The row and column numbers must be enclosed in brackets and
separated by commas.

Return value

The datatype of the expression is Any. The expression returns
an array of structures or user objects. There is one structure element
or user object instance variable for each column in the designated
range. The datatype of each element matches the datatype of the
corresponding column. There is one structure or user object in the
array for each row in the range of rows.


When you specify a block, the expression always returns an
array and you must assign the result to an array, even if you know
there is only one structure in the result.

This expression returns an array of one structure from row

This expression returns an array of one value from row 22,
column 1:


These statements both refer to data in the first ten rows
and first four columns of the DataWindow object in the control dw_1.
The primary buffer and current data are the default:

This example gets employee IDs and last names for all the
rows in the delete buffer. The IDs and names are the first two columns.
It saves the information in a structure, called str_namelist,
of two elements: an integer called id and a string called lastname.
The structure was defined previously in the Structure painter. The
list of IDs and names is then saved in the file DELETED.TXT:

Using the structure from the previous example that holds IDs
and last names, this example sets all the IDs and last names in
the DataWindow control to null:

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x