Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fernwood!oracle!news From: tgreenla@oracle.uucp (Terry Greenlaw) Newsgroups: comp.databases Subject: Re: more ORACLE SQL*FORMS gorey trigger problems Message-ID: <1990Sep17.200151.11764@oracle.com> Date: 17 Sep 90 20:01:51 GMT References: <11268@spool.cs.wisc.edu> Reply-To: tgreenla@oracle.UUCP (Terry Greenlaw) Organization: Oracle Corporation (Federal Division), Bethesda, MD Lines: 56 In article <11268@spool.cs.wisc.edu> beverly@ai.cs.wisc.edu (Beverly Seavey (-Kung)) writes: > >I am working with Oracle SQL*FORMS version 2.0. > > >In one block-level KEY-ENTQRY trigger I have the following two >steps and they work just fine: > > > 1) #COPY &SYSTEM.CURRENT_FIELD GLOBAL.curr_aa; > 2) #EXEMACRO CALL &GLOBAL.curr_aa; > > >So the form that gets called at this point depends on the >value of the variable in GLOBAL.curr_aa. In this 2nd form >that gets called I have as a block level ( I also tried field >level) KEY-EXEQRY trigger the following 2 steps: > > > 1) #COPY &SYSTEM.CURRENT_FIELD GLOBAL.curr_atom; > 2) #EXEMACRO GOBLK molecule; >and the block MOLECULE has a key trigger : > > #EXEMACRO GOFLD &GLOBAL.curr_aa; > > >This trigger, which looks very similar to me, seems to be doomed on >two accounts: > > 1) Oracle complains that the "&SYSTEM.CURRENT_FIELD" is an ambiguous > >field name. It didn't find it ambiguous in the 1st situation. Both blocks being used have more than one column and for each I have the cursor positioned >Oracle no longer finds this ambiguous! Is the problem related to the fact >that I'm in a form called by another????? > >Secondarily, I don't seem to be able to say > >#EXEMACRO GOFLD &GLOBAL.curr_atom, although in the calling form >#EXEMACRO CALL &GLOBAL.curr_aa; worked no problem. > > Is this problem a difference between how Oracle handles block names and > form names ( and the corresponding GOFLDs and CALLs) or once again > could it possibly have to do with nesting level? > > THanks for all the help so far. It sounds like you have two fields with the same name on the form. To resolve the ambiguity do a #copy &SYSTEM.CURRENT_BLOCK || &SYSTEM.CURRENT_FIELD instead. Hope this helps your problem. tog { Terry O. Greenlaw Sheathed within the Walkman, Staff Engineer Wear a halo of distortion. Oracle Corporation Aural contraceptive, tgreenla@oracle.oracle.com Aborting pregnant conversation - Marillion