Re: next field problem
Posted in 1995
Topics: General Discussion
thanks for the reply, but it didn't work. however, through trial and error, i have figured out something that works...but i have no idea why. here's the working code: after field back_order if (gr_dtl[gv_row].back_order not matches "[YN]") then call prg_error(0, "VALUE ENTERED MUST BE EITHER \\"Y\\" OR \\"N\\"") next field s_detail.back_order end if where s_detail is the name of my screen array. if anyone out there knows *why* this works, i'd be pleased to here about it. thanks to all, though, who have responses to my dilemma. -joe- (huddles@hasting.com) ---------- From: ilist To: informix-list Subject: Re: next field problem Date: Wednesday, March 22, 1995 8:47AM Joe, Just a thought - I had a similar problem a log time ago. How are you setting the value for your variable 'gv_row' ? I have found that you must let Informix know what array line you are on inside every AFTER FIELD, BEFORE FIELD, ON KEY etc ... clause. Try using the command 'LET gv_row = arr_curr()' as follows: AFTER FIELD back_order LET gv_row = arr_curr() IF gr_dtl[gv_row].back_order not matches "[YN]" then CALL prg_error(0, "VALUE ENTERED MUST BE EITHER \\"Y\\" OR \\"N\\"") NEXT FIELD back_order END IF I hope this helps, Regards, Keith. *************** tech@compsys.demon.co.uk *************** Tel: 044 (0)1482 803961 Fax: 044 (0)1482 804333 ********************************************************