Looping through Grid


Hello everyone! I am new to JDE and I need your help for an exercise!

I created a headerless detail form for a sales application. In the headerless detail form, there is data about the sales in the grid. There is a column for date. I have to loop through the grid so as to ensure that the date entered is greater than or equal to today's date. I was told to use the Get Grid Number system function but I dont know how to proceed. Can you please help me?
Last edited:


Well Known Member

You can validate the date in Row Change & Exit - Inline or Row Change & Exit - Asynch. If the date entry is less than SL Date Today then you set a error in current row and column date with system function, ok?

If you will need validate all rows in when user click on OK button it's easy with grid system function:

//initialize current row to first
VA frm_55_CurrentRow_MATH01 = 1
//get count all rows grid
Get Max Grid Rows(FC Grid, VA frm_55_AllRows_MATH01)
// check if grid has more than 1 row
If VA frm_55_AllRows_MATH01 is not equal to <Zero>
// loop grid while current row <= last row
While VA frm_55_CurrentRow_MATH01 is less than or equal to VA frm_55_AllRows_MATH01
//get current row values
Get Grid Row(FC Grid, VA frm_55_CurrentRow_MATH01)


//get next row
VA frm_55_CurrentRow_MATH01 = [VA frm_55_CurrentRow_MATH01]+1
End While
End If

I hope help you.