Re: get_fldbuf()
Posted in 1998
I wrote: > > On Fri, 16 Oct 1998 14:18:24 +0100, Peter Lancashire > <Peter.Lancashire.PL1@bayer.co.uk> wrote: > > [snip] > > >Yes, it also works in the INPUT statements. It can also be useful if you > >want to see the contents of a partially completed field when an ON KEY > >clause is triggered. > > > >You can also use DISPLAY to enter values in the field buffer. That > >includes CONSTRUCT. These two capabilities make it possible to save and > >restore queries. Hooray!!! > >-- > > I'm not sure what you mean here Peter, could you post a short example > please? > > Cheers, Ian. Does this somewhat pruned bit of real code help? -- load query into g_savedconstruct.* (a global) if (load_query(g_tables.assess_scid) != 0) then goto l_catch end if -- the form has a screen record called query construct g_savedconstruct.construct_sql on aa.ass_date, {formonly.dat,} cga.gs1, aa.symptom, csy.meaning, aa.assobj, cao.meaning, aa.cause, oga.local, oga.latin, oga.org_type, aa.gs1, aa.size1, aa.gsx, aa.std_mean from query.* attribute(blue, reverse) before construct -- load the field buffers with the saved query display g_savedconstruct.f01 thru g_savedconstruct.f14 to query.* attribute(blue, reverse) after construct if (not int_flag) then -- save the field buffers call get_fldbuf(query.*) returning g_savedconstruct.f01 thru g_savedconstruct.f14 end if end construct -- code to save the contents of g_savedconstruct.* ... -- more code to save the constructed string -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 --- If all else fails, read the instructions and the release notes. Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/ ---