Welcome Guest Login SignUp

Home

Technical

Functional

CNC

AS400

DB2

    Citrix

JDE News

Live Radio

Feedback

JDE Forum Comments/Reviews/Queries
2925 day(s) ago   #60
Name: TechZone
Category: Technical
Location: India
Date: 2012-05-27 18:58:34
Replies(2)

Status:
  #60

Loop through all selected records in a grid

Sometimes there is a need to loop through the selected records in a grid instead of all the records in he grid.

In the past we have looped through all of the records in the grid and determined one by one which ones were selected and which ones were not. The new system functions make it much easier to work only with the selected records in a grid.

Get Selected Grid Row Count - Returns how many records have been selected.
Get Selected Grid Row Number - Returns the grid row number of the first selected record.
Get Next Selected Grid Row - Returns the row number of the next selected row.
Sample code:

Get Selected Grid Row Count(FC Grid, VA frm_SelectedCount_LNID)
If VA frm_SelectedCount_LNID is greater than Zero
Get Selected Grid Row Number(FC Grid, VA frm_GridRowNumber_INT01)
While VA frm_GridRowNumber_INT01 is greater than Zero
Get Grid Row(FC Grid, VA frm_GridRowNumber_INT01)
Get Next Selected Row(FC Grid, VA frm_GridRowNumber_INT01,
VA frm_GridRowNumber_INT01)
End While
End If
1683 day(s) ago   #211
Name: umed
Category: Technical
Location:
Date: 2015-10-21 06:49:30
Replies(2)

Status:
  #211

Loop through all selected records in a grid

Can I use Next Selected Grid Row on the Button Click event ??
1683 day(s) ago   #212
Name: Nick
Category: Technical
Location: Singapore
Date: 2015-10-21 17:57:38
Replies(2)

Status:
  #212

Loop through all selected records in a grid

Hi umed,

I assume you are coding on a Row Exit button or perhaps the `Select` button...

Alternative and simple way to achieve it is, go into ER for the button pressed event. On the `Options` menu, select `Repeat for Grid`. What this does is perform the code in the current event for every selected grid row. No need for any fancy looping, system functions, etc. This may be what you are looking for.

Please specify if your requirement is different.

Thanks.
Post Comments/Queries
Email:*
Name:*
Details:*
 
   
* Required Entry Field(s).  * Your comments may subject to varification.  * Your email ID will not appear in the forum.
 
Disclaimer: Most of the posts in this blog cater solutions/suggestions/workaround to issues for specific tools release or JDE E1 version and are just information only. Please be carefule while applying it in your environment. JDEthread will not be responsible for any data loss or spec corruption (if any).
Copyright © 2010 - 2020 JDEthread.in