How to get the first row number of a dw group on a clicked event?

1
0
-1

hi there,

i have a datawindow with a group. i placed a button in the header of the group but when i click on it, in the event clicked i always get the row number = 0

is there a way to get the first row of each group break?

tia

Question Tags: 

Answers

Michael Kramer answered How to get the first row number of a dw group on a clicked event?

1
0
-1

Hi Simone,

It is possible using "DataWindow expressions" to obtain row information related to a specific group or page. One option for first row within a group is:

  1. Create a computed column in the group header, (ex: name = first_row)
  2. Define its expression = GetRow( )
  3. Make it visible so you can verify visually as you write your code
    ‚ÄčLater hide it if you don't want users to see the value on screen

For further info, see PB Help > DataWindow Reference > DataWindow Expression Functions > Alphabetical list of DataWindow expression functions > GetRow

DataWindow expression functions related to groups: CurrentRow, First, and Last

HTH /Michael