Evaluating DataWindow expressions in scripts
In a script, you use methods, properties, and data expressions
for the DataWindow control to get information about the state of
the DataWindow: the current row, the highlighted row, values of
particular items. You can get other information by accessing properties
of the DataWindow object, either with the Describe function
or with property expressions.
For example, if you need to find the current row in a DataWindow,
use the DataWindow control function, GetRow:
1 |
ll_rownum = dw1.GetRow() |
If you need to find the first row on the current page in a
DataWindow, there is no DataWindow control function to return this
information, but you can find it in the appropriate DataWindow object
property:
1 |
ls_first = dw1.Object.DataWindow.FirstRowOnPage<br>ls_last = dw1.Object.DataWindow.LastRowOnPage<br>dw1.Title = "Rows " + ls_first + " to " + ls_last |
In some cases, however, information you need might not be
available either by using DataWindow control functions or by accessing
DataWindow object properties.
DataWindow expression functions sometimes provide information
that is available in no other way. These functions, which are available
within a DataWindow expression, are documented in “Using DataWindow expression functions”.