FW: 4gl Input array question?
Posted in 1997
We take different approach to this issue. We have to arrays, one for the display elements and one for those not displayed. The combined record layouts contain all the fields from the table. We then fill the arrays and allow the user to do what they like with the displayed rows and keep the two arrays in sink with logic built into the input area logic (after delete, after insert...). Then when we write the info back out the the table we can take the data from the two arrays and reconstruct each row for reinsertion into the table. Russ.. }---------- }From: Peter Lancashire[SMTP:debayd8k@ibmmail.com] }Sent: Monday, May 19, 1997 6:54 AM }To: informix-list@rmy.emory.edu }Subject: Re: 4gl Input array question? } }Matt Brickley wrote: }> }> 4GL 4.12, SE 5.01, SCO Unix 3.2v4.2 }> }> I have a table with 8 columns. I want to let the user update, delete, }> or insert to a screen array with only 6 of the columns displaying. }> How can I do this when the number of variables in the screen array must }> match the program array? }> }> For simplicity sake, I want to let 4gl handle the array and when the user }> is done modifying the array, I want to delete all of the rows in the }> table and insert all of the changed rows from the screen/program array }> }> TIA }> Matt Brickley }Another idea: } }Pack all the non-displayed fields into a single char field with an }internal structure of your choosing. Display it in a single-char }invisible screen field and don't allow the user into it with the NOENTRY }form attribute. It gets carried along with any array editing and you can }unpack it before updating the database. This is a lot simpler than the }horrendously complex code in the Informix 4GL by Example book using two }arrays. }-- }Peter Lancashire }Information Systems Specialist, Bayer plc }Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK }Tel: +44-1635-562258, Fax: +44-1635-562281 }