!HELP! Handling cursor position in arrays
Posted in 1992
I'm using Informix 4.00 on SCO-ODT 1.1 and I've the following problem: in an INPUT ARRAY ... WITHOUT DEFAULTS ... I need to control every inserted or modified row before moving from this row to another. If the user entered a bad value in a field I would like to reposition the cursor in it. Here is an example: Before modify: Code Description Quantity [ANZ ][volleyball ][ 2] [SMT ][tennis racquet ][ 20] [HRO ][baseball ][ 15] After modify: Code Description Quantity [ANZ ][volleyball ][ 2] [SMT ][ ][ 20] <-- Field description is wrong [HRO ][baseball ][ 15] The solution I came up with is to validate the row only if the user leaves the third field (AFTER FIELD quantity) or presses ESCAPE key. I tried using AFTER and BEFORE ROW keywords but I can't go back on wrong field (NEXT FIELD description) because the cursor position is already on next row ("baseball"). I also have some limitation imposed by the customer: I can't validate after inserting every field, I should avoid using C routines. Can you 4GL experts suggest me the best way to handle this situation? Thank you very much.