Reading Grid Records

jberry123

Active Member
Hi List,
Is there a way you can read the grid after the okay button is pushed.
What I am trying to do is follows and hopefully someone has a good way of
doing this.

In PO Reciepts (P4312) On Grid Purchase Order Detail (V4311C), I have added
a dd URDT (used for expiration Date). I need to update all the grid item
numbers in the item master with the URDT.

Example:
Your screen comes up
Item number = 1234 Quantity To Recieve = 1 (you manually enter in amt)
Item number = 5678 Quantity to Recieve = 5

During this process they also enter in a date in the DD URDT.

When OK is press to update the files, I need to be able to read the Item
number to do a UPDATE on F4101 with item (key) and Date(Update Field).

Please Help.
JB


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.
 

Zoltan_Gyimesi

Legendary Poster
Jimmy,
You can do it.

1.) Define two MathNumeric variable (DataItem: MATH10 is my recommendation) to store the numbers of gridlines (MaxGridLines) and to store a running line number (LineCounter).
2.) Retrieve the number of lines in the grid via "Get Max Grid Rows" system function (Grid category) into MaxGridLines.
3.) Initiate LineCounter to 1.

4.) Construct a While loop like this:

While LineCounter is Equal or Less than MaxGridLines
Get Grid Row (Grid, LineCounter)
// Insert your logic here.
// Here you will see the values of the grid row
// which is pointed by LineCounter (1st, 2nd, 3rd,...)
// in GC fields
LineCounter = LineCounter + 1
EndWhile

"Get Grid Row" is also a System Function (Grid category).

Let me know if you need more help (or if it works:)
Zoltán
 

jberry123

Active Member
Thanks Zoltan for the help, This works great. Although I also found out that
if you create the variable and click on Grid to make it a
va grd_MaxGridLine instead of va frm_MaxGridLines - It doesn't work. It has
to be va frm_MaxGridLines (without the Grid checked in the variable).

Thanks for the much needed help.
jb

>From: Zoltan_Gyimesi <[email protected]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: Reading Grid Records ~~443:445
>Date: Fri, 3 Nov 2000 11:35:46 -0800 (PST)
>
>Jimmy,
>You can do it.
>
>1.) Define two MathNumeric variable (DataItem: MATH10 is my recommendation)
>to store the numbers of gridlines (MaxGridLines) and to store a running
>line number (LineCounter).
>2.) Retrieve the number of lines in the grid via "Get Max Grid Rows" system
>function (Grid category) into MaxGridLines.
>3.) Initiate LineCounter to 1.
>
>4.) Construct a While loop like this:
>
>While LineCounter is Equal or Less than MaxGridLines
> Get Grid Row (Grid, LineCounter)
> // Insert your logic here.
> // Here you will see the values of the grid row
> // which is pointed by LineCounter (1st, 2nd, 3rd,...)
> // in GC fields
> LineCounter = LineCounter + 1
>EndWhile
>
>"Get Grid Row" is also a System Function (Grid category).
>
>Let me know if you need more help (or if it works:)
>Zoltán
>
>
>--------------------------
>Visit the forum to view this thread at:
>http://198.144.193.139/cgi-bin/wwwthreads/showflat.pl?Cat=&Board=OWDEV&Number=445
>*************************************************************
>This is the JDEList One World Developers Mailing List.
>Archives and information on how to SUBSCRIBE, and
>UNSUBSCRIBE can be found at http://www.JDELIST.com
>*************************************************************
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.
 

Zoltan_Gyimesi

Legendary Poster
Jimmy,
I haven't meant to suggest grid variables.
I have forgotten to write "Event or Form scope" because it was too obvious for me.
Please, excuse me this difficulty.
Zoltán
 
Top