Re: Question: get to next row in INPUT ARRAY
Posted in 1991
Path: emory!swrinde!cs.utexas.edu!uunet!ddssuprs!lpc From: lpc@ddssuprs.UUCP (Luis Caamano) Newsgroups: comp.databases.informix Message-ID: <1991Dec03.153629.20164@ddssuprs.UUCP> Date: 3 Dec 91 15:36:29 GMT References: <1991Dec2.191316.12675@odin.corp.sgi.com> Organization: Dickens Data Systems, Inc. In article <1991Dec2.191316.12675@odin.corp.sgi.com> westover@cim1.asd.sgi.com (Richard Westover) writes: > > ... > >So, my general problem is how do I within my INPUT ARRAY command >move the cursor up or down a row (or even multiple rows ). > Just add a one character noentry formonly field at the end of the screen record. When you want to go to the next line say next field that field and the cursor will go down. For example, having the form like this [market_code ] [serial_no ] [ist_num] [a] [market_code ] [serial_no ] [ist_num] [a] ... [market_code ] [serial_no ] [ist_num] [a] ... a=formonly.dummy, noentry; then do AFTER FIELD market_code IF market_code = current values THEN NEXT FIELD dummy END IF since the last field is a noentry field then input array will go down to market_code in the next line. There's no automatic way to go up, but using this you can have some logic to exit the input array, set some flags or counters and then go back to the input array and force it to go down to the row that is one less than the one where you were when you wanted to go up, yielding the net result of going up one line. Sounds strange but it works if you really need to go up. Personally I haven't found a justification to put all that code to go up, but going down I used it in an accounting journal entry form. Hope that helps, Regards -- --------------------------------------------------------------------------- Luis P. Caamano | Support Services Engineer | uunet!ddssuprs!lpc Dickens Data Systems, Norcross GA | (404) 242-5991 --------------------------------------------------------------------------- If you think you know something, you'll stop learning. -myself