amwalshjde
Well Known Member
I am having difficulty with a application I am writing. It is a header
detail. The grid can be populated with many (several hunderd) records. The
user can change data in one field (for example ship quantity). I want (and
have) an error in the grid to indicate that the ship quantity is greater
then the Order quantity. If any (just takes one) of the grid lines has this
error then I want the form exits disabled.
I first tired to the the system value "ERROR Status" but that only gets set
to an error when business functions return a error, or a table IO fails, not
when the set error system function is used. So it was no help. My second
idea was to set a error flag (say ev01) in the "Grid section changed +
exited - inline" to test for the error, and if present set the flag to "1",
else "0". This worked until I had errors on multiple lines. THen as soon
as I fixed one line, the error status became "0" (that controls the system
function to enable the form exits). The only other thing I can think of is
to read every record in the grid each time a grid row is exited. That just
seems like a lot of reading just to see if one line has a problem. If I had
100 grid lines and the user changed 50 of them, I would have to do 5000 grid
line reads...
Anyone have a better idea?
Aaron
B7332 sp 13.1 AS/400 v4r4
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
detail. The grid can be populated with many (several hunderd) records. The
user can change data in one field (for example ship quantity). I want (and
have) an error in the grid to indicate that the ship quantity is greater
then the Order quantity. If any (just takes one) of the grid lines has this
error then I want the form exits disabled.
I first tired to the the system value "ERROR Status" but that only gets set
to an error when business functions return a error, or a table IO fails, not
when the set error system function is used. So it was no help. My second
idea was to set a error flag (say ev01) in the "Grid section changed +
exited - inline" to test for the error, and if present set the flag to "1",
else "0". This worked until I had errors on multiple lines. THen as soon
as I fixed one line, the error status became "0" (that controls the system
function to enable the form exits). The only other thing I can think of is
to read every record in the grid each time a grid row is exited. That just
seems like a lot of reading just to see if one line has a problem. If I had
100 grid lines and the user changed 50 of them, I would have to do 5000 grid
line reads...
Anyone have a better idea?
Aaron
B7332 sp 13.1 AS/400 v4r4
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com