Re: ON KEY with EXIT INPUT: loosing field data
Posted in 1995
> > > However, I have run into the problem described in the INPUT manual > > > page. > > > The ON KEY command expects to return to the current field. Because > > > my > > > ON KEY contains an EXIT INPUT statement, any data changes in the > > > current > > > field are discarded when the EXIT INPUT is done. > > .... > > .... > > > > Have a look at the get_fldbuf() function. > > The get_fldbuf() is not practical in all cases. If you have a form with > many fields, picked out of several records, the get_fldbuf() function > is very tedious to use and ridiculous to maintain. .... Yes, and the other snag with get_fldbuf(), as I found out to my cost yesterday, is that you have to do your own numeric/ date validation. I had to use: WHENEVER ANY ERROR CONTINUE LET p_numeric_field = get_fldbuf(numeric_field) WHENEVER ANY ERROR CALL error_handler IF status = -1213 THEN -- 'Character to numeric conversion error' ERROR "Must be numeric!" NEXT FIELD numeric_field END IF A real PITA if you've got loads of enterable fields on the screen, I grant you. akent@cix.compulink.co.uk (Andy Kent) ------------------------------------------------ Freelance Informix Database Specialist, Redland, Bristol, England