Re: input array, next row?
Posted in 1994
From Joe Morris: * * Hi, I've got an order entry program that uses an input array. When * a user performs a certain action (via "on key") on the current * row, I want their cursor to automatically move down to the next row * when said action is complete. I muddled around with it all * afternoon and couldn't get it working. Try having a noentry field in every row as the last field so when in the ON KEY section, you can state NEXT FIELD noentry_field. Ex. #========================================================================== DEFINE pa_array ARRAY[ 10 ] OF RECORD field1 LIKE tbl_name.field1, field2 LIKE tbl_name.field2, field3 LIKE tbl_name.field3, field4 LIKE tbl_name.field4, field5 LIKE tbl_name.field5, noentry_field CHAR( 1 ) END RECORD INPUT ARRAY pa_array WITHOUT DEFAULTS FROM sc_array.* ON KEY ( some_function_key ) CALL do_something() NEXT FIELD noentry_field END INPUT #========================================================================== And the form would look like this: #========================================================================== DATABASE db_name SCREEN { Field1 Field2 Field3 Field4 Field5 [a |b |c |d |e |f] [a |b |c |d |e |f] [a |b |c |d |e |f] [a |b |c |d |e |f] [a |b |c |d |e |f] [a |b |c |d |e |f] } TABLES tbl_name ATTRIBUTES a = tbl_name.field1; b = tbl_name.field2; c = tbl_name.field3; d = tbl_name.field4; e = tbl_name.field5; f = formonly.noentry_field, noentry; #========================================================================== Hope this helps, Robert Minter |Data Systems Support| \\\\\\_/// Programmer, Software Development | Orange, CA | ( _ _ ) internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/ #include <disclaimer.h> \\_/