Re: Using string values as var names in 4GL
Posted in 1997
In a word: No! If all you need is displaying an arbitrary field to the corrisponding screen field, you may consider storing your record elements in an array of strings, and subsequently displaying the array element to an arbitrary screen array field. Note that populating the array will be pretty ugly, though. For a more general solution, the thing that comes closer is a prepared select statement which selects your arbitrary field (a string this time) from a table. You could even consider filling a temp table with your record contents and select the arbitrary field. Again temp table population will be tedious, to say the least. In all, the detailed answer is forget about it! STDH, Marco _______________________________________________________________________________ Marco Greco, Catania, Italy Informix faq http://www.iiug.org/ marcog@linux.ctonline.it 4glworks http://www.ctonline.it/~marcog rem radioterapia +39 95 447828 fax 446558 Ian Boyes wrote: > > Hi > > I would like to use a string to store the names of record fields in > 4gl and then use the field later to reference the field. Is there any > way in 4GL of doing that > > eg > > define Lstring char(30) > > let Lstring = "VariableName" > > display RecordName.Lstring > > Thanks for any help > Ian Boyes