SQL*Forms 3.0 question - how to track position number?
Date: Mon, 4 Oct 1993 23:00:59 GMT
Message-ID: <CEEALo.3Jw_at_knot.ccs.queensu.ca>
Hello:
I have a question for SQL*Forms 3.0. I have a form which allows the user to scroll through all employees working at a given location. Thing is, an employee may have more than one position (eg. one half-time job, and two quarter-time jobs) in that location. Therefore, I wish to indicate position [1] of [3] in the block.
I have tried to do this myself, and have it sort of working...but the logic is so messy with the triggers that I need some help...
In order to implement this, I have a hidden block on page #2 that the user can't see. This is where I store 'CUR_POSN_COUNT' and 'TOT_POSN_COUNT' (that way the user can press COMMIT in the normal block and they won't have a block change). When a new employee is displayed, 'TOT_POSN_COUNT' is loaded with the total active positions, and 'CUR_POSN_COUNT' is set to 1. When KEY-DOWN is pressed, and KEY-UP, the value of 'CUR_POSN_COUNT' is supposed to increment or decrement accordingly (assuming the value of 'EMPLOYEE_ID' remains constant).
POST-CHANGE: If employee_id <> last_id then
last_id = employee_id, cur_posn_count = 1, get_tot_posn_count. KEY-DOWN: If employee_id = last_id then cur_posn_count++. KEY-UP: If employee_id = last_id then cur_posn_count--;
This is just not working the way I thought it would. Firstly, is this the best way of doing something like this, and secondly, have I implemented it correctly?
Thanks in advance...
--
-------< $_at_$o$?$7$O!"$K$[$s$4$N$Y$s$-$g$&$r$7$F$$$^$9!#(J >-------
Steve Frampton Home: <frampton_at_vicuna.ocunix.on.ca> Kingston, Ontario School: <2843600_at_jeff-lab.queensu.ca>Received on Tue Oct 05 1993 - 00:00:59 CET