Re: Can 4GL do a NEXT FIELD to a screen array element?
Posted in 1991
Path: emory!ogicse!sequent!muncher.sequent.com!lugnut From: lugnut@sequent.com Newsgroups: comp.databases.informix Message-ID: <1991Oct21.173634.21933@sequent.com> Date: 21 Oct 91 17:36:34 GMT References: <1991Oct18.224210.20229@group1.UUCP> Sender: news@sequent.com (News on Muncher) Organization: Sequent Computer Systems, Inc. Posted: Mon Oct 21 10:36:34 1991 In article <1991Oct18.224210.20229@group1.UUCP> van@group1.uucp (Van Bagnol) writes: If you are using I4gl NOT R4gl, you can test for the value of eflastkey and if the array element value IS NULL then do an exit input and set a flag that when tested (outside the current function) would call up the input again. (the default performance when wrapping to the top is for 4gl to *completely* redisplay the array. You might find this poor in situations where your array contains many more rows than can fit on the current row display however). I like to put all my input calls inside a while loop and use a flag value to determine "next section" this allows users to traverse up and down in thru multiple input stmts. end input let next_section = next_section + 1 for moving back up to the prior input stmt merely: exit input let next_section = next_section - 2 or in your (at least my understanding of) case AFTER FIELD blarvitz IF p_file[cntr].blarvitz IS NULL AND eflastkey != 2000 THEN LET next_section = next_section - 1 EXIT INPUT END IF This syntax *will* allow them to arrow back up from a blank row, or exit it Undoccumented "feature" NOW you can read the direction of approach and conditionaly branch BEFORE and AFTER FIELD, ROW stmts.... I4GL ONLY!!!!!!!!! UP arrow = 2000 DOWN arrow = 2001 (also linefeed) LEFT arrow = 2002 RIGHT arrow = 2003 RETURN = 13 INTERUPT = 2011 TAB = 9 USEAGE DEFINE elastkey SMALLINT <in GLOBALS AFTER FIELD hot_dog IF p_file.hot_dog IS NULL AND eflastkey != 2000 THEN EXIT INPUT END IF In an input array stmt this allows my users to move back UP to edit a row previously entered, but NOT to enter a blank line followed by non blank ones. :-)