Jump to content


Photo
- - - - -

paging screen in change mode


1 reply to this topic

#1 snell

snell

    Member

  • Members
  • PipPip
  • 10 posts
  • Gender:Male

Posted 05 February 2006 - 06:30 PM

Hi,

i am facing a problem in paging screen handling( change mode) :

paging screen looks like this

field1 field2 field3 qty totalqty

aaa part1 1111 1
aaa part1 1112 4
aaa part1 1113 1
aaa part1 1114 0 6

bbb part3 2222 0
bbb part3 2223 7
bbb part3 4566 12 19



user can change the qty field as he wishes for field 1field2 field 3 , but sum of qty for that part number should not exceed total - quantity .
ie (1,4,1,0 = 6 , if user changes 2,2,2,0 = 6 . it is okay . less than total quantity is also okay.
but 1,4,1,2 > 6 is error. user must change the values so that it fits the equation)



the values displayed on the screen froma file with above saif fields and also one more field that has total quantity for all part number like below
this addtional field , i have created in prev report for making things easy.


field1 field2 field3 qty totalqty totl quantiy1

aaa part1 1111 1 6
aaa part1 1112 4 6
aaa part1 1113 1 6
aaa part1 1114 0 6 6

bbb part3 2222 0 19
bbb part3 2223 7 19
bbb part3 4566 12 19 19


here two check are required


if qty of filed3 > total quantity1 , then error and place the cursor at erro field ie qty

if sum of qty of all field3 of single part number > total quantity1 . then error.



when i put the above two logics in before write of file in paging section. it is not working. when i change the value for qty field
and go to next qty field, then also i don't see any change in qty field of file in before write.


How can check this logic ;)

suggestion please
Thanks,
Snell

#2 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 368 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 06 February 2006 - 11:05 AM

Sounds like the RefreshPage property might help
for the refresh part, it is only available in write-no-error logic.

But by then, its too late to return to the field after an errorcheck,
because of the paging screen timing cycle.

You could try doing the logic checks in ''lost-focus'' (FLD-AFT) point,
you should be able to LSCALL to get the running totals (if
you have trouble maintaining them internally and it's often
tricky).


But you may have trouble is user presses arrow keys to move to next
record instead of pressing enter after entering data in your input field.

In which case you may have to redisplay the paging cycle and reenter,
and try to get back to where you were using CurPagingSequence and
StartPagingSequence (@SPSEQ).


HTH!
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users