Path: utzoo!attcan!uunet!aplcen!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrlnk!ncrwic!sfc!chas From: chas@sfc.Wichita.NCR.COM (Charles Binford) Newsgroups: comp.databases Subject: Oracle Forms question Keywords: Oracle, SQL-Forms, update, insert Message-ID: <326@sfc.Wichita.NCR.COM> Date: 5 Feb 90 19:36:24 GMT Organization: NCR Corporation, Wichita, Kansas Lines: 25 I am running Oracle 5.1 and have a question on how to perform something in my form. I have a key-nxtfld trigger on a field that sometimes updates another display-only field. The field update should *never* happen when the record has been queried-up (?) and is being changed (UPDATED). If this is a new record (INSERT), then based on other criteria, I want to modify the display-only field. How do I know if I am in UPDATE or INSERT mode? I have thought about a trigger on the query key which would set a global.variable. But, what about when the user's query returns 5 records, he arrows down to the 6th (blank) record and *inserts* a new record. What trigger can I set to tell me this is an insert and not an update? My ideal solution would be to access a 'system.mode' variable that told me if the current record was either an update or an insert. I do not know of any such variable, however :-(. Thanks for any help. Charles Binford, Automation Engineering, NCR E&M Wichita <{ece-csc,hubcap,gould,rtech}!ncrcae!ncrwic!c.binford> <{sdcsvax,cbatt,dcdwest,nosc.ARPA,ihnp4}!ncr-sd!ncrwic!c.binford>