Re: [?]How to limit disallow inserts in INPUT ARRAY
Posted in 1995
cpilot (cpilot@teleport.com) wrote: : ... : My problem is that I wish to allow only updates on the information : displayed. Deletes have been dealt with however that leaves inserts. : How do I disallow inserts? You have to do two things to disallow inserts: disable the INSERT KEY and make sure the user doesn't go below the filled area of the array. Disabling the INSERT KEY should be simple, since you've already taken care of deletes. My favorite Unix method is: OPTIONS INSERT KEY CONTROL-Q Since ^Q is stty xon just about everywhere, the signal gets trapped by the OS and never is sent to the 4GL program. Another way to insert is to go below the filled-in area of the array. So stop the user before they can get there: # act = the # of rows filled in CALL set_count(act) INPUT ARRAY ... BEFORE ROW LET arr = arr_curr() LET scr = scr_line() IF arr > act THEN # do whatever you want to keep the user out of this row, # like maybe EXIT INPUT END IF ... There are ways to loop the user back to row 1 of the INPUT ARRAY; see the FAQ on the NOENTRY ... NEXT FIELD trick to emulate the noexistant NEXT ROW syntax we all want. Or ask me and I'll sent you my example. ======================================================================= Dennis J. Pimple dennisp@informix.com Opinions expressed Senior Consultant -------------------- are mine, and do not Informix Software Inc Voice: 303-850-0210 necessarily reflect Denver Colorado USA Fax: 303-779-4025 those of my employer.