Help: Overrideable serial numbers in forms?
Posted in 1994
I'm modifying an Informix form, for Informix 2.1(?) running on an Interactive Unix 386 box. I know it's a very old version, but that can't be helped right now. The problem is that when entering a new row, I want a field with a serial number, which has a new automatically generated number as default. I also want it to be overrideable, so a non-default number can be used. My current solution involves having a SERIAL type column in the table which contains the default value and a column with the real serial number. If the real serial is unchanged, it copies the SERIAL into it as part of either an "after editadd" or "after add", otherwise it leaves it as it. The problem with this is that until the add takes place, the SERIAL value is 0, and once the Add has taken place the default doesn't make it into the table. Is there a better way of doing this (I'm there must be, but the limitations of the forms language is making it hard for me to see it)? Please reply in mail; I'll summarize if anyone else is interested. Thanks, Jeremy Fitzhardinge