Re: Need help with referencing fields within a construct
Posted in 2000
June Tong wrote: > Can't find an 'Oops', but yes, I believe you can do this. Also "After Field > field1", which will probably be safer, since there is no guarantee that the user > will end up in field2 after entering field1. The "After Field field1" option, > however, may require you to use getfldbuf() (or whatever that function is called), > to get the contents of the buffer, since it may not yet be in 'field1'. Thanks, June and Jonathan for the get_fldbuf() tip. That does the trick nicely. The reason I'm wanting it in a 'before field' statement is to keep the user out of certain fields based on what is in a prior field. So, before I enter a field that pertains only to employees, I wanted to check to see if the type contained "EMPL", if not I skip to the next valid field. This works best in a before field since I have four optional fields to deal with and therefore don't need to know if the user is backing up or going forward. Before I enter the first optional field, if the test field is not "EMPL" skip all four. Before I enter the last optional field, if the test field is not "EMPL" I skip backward to the field just before the optional ones (the only direction you could be going to get to the fourth field is backward since the other before field statement keeps you out from the other direction). Of course, this only works if you have at least two contiguous fields you're skipping. If my logic is faulty here, please point out the better path. I may not be the sharpest pencil in the cup, but I believe ignorance is curable. Thanks again for the get_fldbuf() tip, carlos > > > June > -- > june_t@hotmail.com > Back from the dead, resuscitated by Godiva chocolates... > > Please do not send Informix questions to this account. > I would add 'Please do not send spam to this account' > but I suppose I would be wasting my bits. -- ------------------------------------------------------------------------------- Carlos Benjamin, Jr. (623) 869 - 2364 Programmer/Analyst/Consultant Currently Assigned to Central Arizona Project mailto:inf999@cap-az.com -------------------------------------------------------------------------------