How to discover which field was clicked in when-new-record-instance

Suppose: a multi-record block. The user is positioned on an existing record on field A
Action: user clicks on empty (new) record on field B
Question: how can I discoverer that the user clicked on field B in the when-new-record-instance? Already tried :system.current_item and :system.trigger_item. They both contain 'field A'.
Edited by: user473811 on 26-aug-2010 4:56

That should work. What version of forms are you running?
I tested it out on Forms 9.0.4 just to make sure and :system.current_field, :system.current_item, :system.cursor_field, and :system.cursor_item all bring back field B when I run the form in debug mode. Is there logic in your when-new-record-instance trigger that is taking you back to field A before you look at the :system variables?
I would run the form in debug mode if I was you and break on the first thing in the WNRI trigger and just step through it looking at those system variables so you can see what it happening, but it should work unless you have some bugged up version of forms or are doing a go_item in the trigger back to field A.

Similar Messages

  • How to undo update of checkbox after triggering when-new-record-instance

    Hi,
    I am using eBusiness Forms Personalization in 11.5.10 to alter the Receipts form in Purchasing. I want to prevent users checking the rcv_transaction checkbox if the destination is "Multiple" and, instead, click the "+" sign to explode the multiple record into it's many component records.
    I can do this by invoking the when-new-record-instance trigger to make the "multiple" record fields unalterable and issue a warning message when the user selects such records. However, my problem is that - if the user clicks the checkbox as the first field in a "multiple" record, then this updates the checkbox to "Yes" BEFORE the trigger fires, which then locks the record for update.
    What I need is a solution that either sets the checkbox to unalterable for "multiple" records BEFORE the user clicks into such records, OR a method of undoing the update of the checkbox after the record has been selected (I cannot do this by simply setting it to "No" by the trigger as this is still technically an update and locks the record).
    Cheers
    Graham

    Hi Navnit,
    Yes you are right, but it can work even we not plase quotation mark in it. But Yes I forget to place semi colon so now it is
    IF :System.Cursor_Record = 1 THEN
       :Block.Col1 := '02:00';
    ElsIF :System.Cursor_Record = 2 THEN
       :Block.Col1 := '07:00';
       ------and so on
    END IF;Danish

  • How to populate automatically in a when-new-record-instance trigger?

    I have a form which displays around ten rows with about 5 columns. Whenever i will create a new record, i would like to place an initial value on the first column of every record. How do I do this? If I place the value in the properties of the item, it would be replicated on all the rows. What I want is to put a different value for each row created. But the problem is there is only one item property that i can put a value on (displayed 10 times). How do i put different initial values for each record created without creating new items for each record. is this possible? Thanks a lot

    Hi Navnit,
    Yes you are right, but it can work even we not plase quotation mark in it. But Yes I forget to place semi colon so now it is
    IF :System.Cursor_Record = 1 THEN
       :Block.Col1 := '02:00';
    ElsIF :System.Cursor_Record = 2 THEN
       :Block.Col1 := '07:00';
       ------and so on
    END IF;Danish

  • Which row was clicked in an SQL Query (updateable report)?

    I have an application with a report based on an SQL Query (PL/SQL function ...) defined on the Global Page.
    On the pages where the report is used, I want to click in a particular column (TCKT_ID) and pass the values in that row to another page for processing.
    Things I would like to know:
    1) How to determine which row was clicked?  The column is TCKT_ID and it is used as a link to another page.  The SQLis a non-trivial (for me!) join of tables.
    2) How to refer to the values of the other columns in that row?  Because I format with "div," the columns are named -- no "f02", "f03", etc.
    3) How to pass multiple values (ENAME, JOB, MGR, SAL, COMM) to the target page?  You might ask: Why not just re-query for the data using a unique key.  Splendid idea, but the unique key is four columns so I still need some way to pass these four values to have that unique key.
    I've constructed a "pretty close" example of the situation here:
    WS APEX_EXAMPLES_01
    demo / demo
    Application: Row Info  10782  - Page 0 has the report.  Page 1 displays it with a link (in red) to page 2.
    I think I can complete most of what I need if someone can just show me how to get, say, the ENAME of the row clicked on page 1, so I can use it to filter the query on page 2 to just this row clicked on page 1.
    Using <tt> </tt>, I tried to display the actual row from View -- Source of the real report I'm dealing with but it just comes out like this
    M - F
    MM_O_BD_DAILY.ctl (ftp D046)CMM_O_BD_DAILY.sh (ftp D046)17:15
    10JUN13 17:00:52
    10JUN13 17:00:53
    17:15
    10JUN13 17:00:52
    10JUN13 17:00:53
    17:00
    10JUN13 17:00:59
    10JUN13 17:01:00
    Y
    ARS003_TESTNBD

    I wonder if I'm not understanding something. This seems like a very simple thing to do without any "tricks"
    Take a look, I've modified the LINKING_NUMBER column on the p0 report.
    Basically, you just specify the fields you want to populate and their assignments.  I added 4 destination fields on p2 to receive the assignments.  Then you can do anything you want with them like modifying a report, etc...
    The only trick here is that in order to pass more than 3 items in the URL you need to change your link type from Page in this application to URL.  Then you can specify lost of items this way.
    Thanks
    -Jorge

  • How can i change the code in when new form instance trigger using JDAPI

    Hi all,
    Can anyone tell me how can i use JDAPI to modify the when-new-form-instance trigger in all my forms,coz we have around 500 FMB's ,if this is possible by using jdapi it will be better for us..
    Thanks in advance..
    Najeeb

    Hi Najeeb,
    The code I've given you should cover the basic steps - you will need to have a basic knowledge of Java if you want to use the JDAPI, there's no way around that unless you go and buy one of the off-the-shelf products for this kind of thing (I think there's one called orcltoolbox..?)
    I've written an application that does all kinds of things to Forms specific to our needs, so it's a bit tricky to just pull out the code you need, but again, the basics will be:
    String formName="C:\some_dir\some_form.fmb";
    FormModule mForm=FormModule.open(formName);
    Trigger myWNFITrig=Trigger.find(mForm,"WHEN-NEW-FORM-INSTANCE");
    String myText=myWNFITrig.getTriggerText();
    And there you have your trigger text, to do with what you please. You could put this code in the main() method of one class if you want to keep things really simple - but see how you get on, if you have any more specific questions, do come back.
    Eric - that's a very good point about using Regular Expressions. I haven't used them in my JDAPI app because I wanted to keep all my .fmbs 6i-compatible for the short-term, and a posting I saw somewhere recommended sticking to Java 1.3. Which rules out the regex facility, which only appeared in Java 1.4. Now, though, I think I needn't have worried - it surely shouldn't matter which version of Java I use to make the changes to the .fmbs. My stupid!
    James

  • How can I determine which image was clicked in 3D carousel?

    I have been modifying some 3D carousel code that I found in hopes that I can get it such that when image "resolv2.jpg" (or any of my other images) is clicked on at the front of my carousel, it goes to a specific webpage. By just replacing "moveBack(event.target) from the toggler section of the code with "navigateToURL:(newURLRequest('http://google.com'), the target DOES sucessfully go to google when clicked on. However, I want to modify this code by altering the else statement to say something to the effect of "else if event.target (clicked on object) is 'resolv2.jpg' THEN go to google". So essentially, my question is how can I determine which image was clicked? Here is the entire code with the area I was altering bolded:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init();" backgroundGradientColors="[#000033, #000033]" backgroundGradientAlphas="[1.0, 1.0]">
    <mx:Script>
              <![CDATA[
    //Import Papervision Classes
                   import org.papervision3d.scenes.*;
                   import org.papervision3d.cameras.*; 
                   import org.papervision3d.objects.*;
                   import org.papervision3d.objects.primitives.*;
                   import org.papervision3d.materials.*;
                   import org.papervision3d.materials.shadematerials.*;
                   import org.papervision3d.materials.utils.MaterialsList;
                   import org.papervision3d.lights.*;
                   import org.papervision3d.render.*;
                   import org.papervision3d.view.*;
                   import org.papervision3d.events.*;
                   import org.papervision3d.core.*;
                   import org.papervision3d.lights.PointLight3D;
                   import flash.filters.DropShadowFilter;
                         import caurina.transitions.*;
                         private var numOfItems:int = 5;
                         private var radius:Number = 600;
                         private var anglePer:Number = (Math.PI*2) / numOfItems;
                         //private var dsf:DropShadowFilter = new DropShadowFilter(10, 45, 0x000000, 0.3, 6, 6, 1, 3);
                   public var angleX:Number = anglePer;
             public var dest:Number = 1;
                   private var theLight:PointLight3D;
            //Papervision Engine
                   private var viewport:Viewport3D; 
                   private var scene:Scene3D; 
                   private var camera:Camera3D;
                   private var renderer:BasicRenderEngine;
             private var planeArray:Array = new Array();
             [Bindable]
             public var object:Object;
             private var arrayPlane:Object;
             private var p:Plane;
             //Initiation function           
             private function init():void 
             viewport = new Viewport3D(pv3dCanvas.width, pv3dCanvas.height, false, true); 
             pv3dCanvas.rawChildren.addChild(viewport); 
             viewport.buttonMode=true;
             renderer = new BasicRenderEngine();
             scene = new Scene3D(); 
             camera = new Camera3D();
             camera.zoom = 2; 
             createObjects(); 
             addEventListeners();
    //Create Objects function          
              private function createObjects():void{
              for(var i:uint=1; i<=numOfItems; i++)
                        /* var shadow:DropShadowFilter = new DropShadowFilter();
                        shadow.distance = 10;
            shadow.angle = 25; */
                        var bam:BitmapFileMaterial = new BitmapFileMaterial("images/resolv"+i+".jpg");
                        bam.oneSide = false;
                        bam.smooth = true;
            bam.interactive = true;
                        p = new Plane(bam, 220, 200, 2, 2);
                        p.x = Math.cos(i*anglePer) * radius;
                        p.z = Math.sin(i*anglePer) * radius;
                        p.rotationY = (-i*anglePer) * (180/Math.PI) + 270;
                        scene.addChild(p);
                        //p.filters=[shadow];
                        p.extra={pIdent:"in"};
                        p.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
            planeArray[i] = p;
              // create lighting
            theLight = new PointLight3D();
            scene.addChild(theLight);
            theLight.y = pv3dCanvas.height;
              private function toggler(event:InteractiveScene3DEvent):void
                            // if the cube's position is "in", move it out else move it back
                            if (event.target.extra.pIdent == "in")
                                    moveOut(event.target);
                            else
                                   moveBack(event.target);
                    private function moveOut(object:Object):void
                              trace(object +" my object");
                            // for each cube that was not selected, remove the click event listener
                            for each (var arrayPlane:Object in planeArray)
                                    if (arrayPlane != object)
                                            arrayPlane.removeEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                            //right.enabled=false;
                            //left.enabled=false;
                            // move the selected cube out 1000 and rotate 90 degrees once it has finished moving out
                            Tweener.addTween(object, {scaleX:1.2, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            Tweener.addTween(object, {scaleY:1.2, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            // set the cube's position to "out"
                            object.extra = {pIdent:"out"};
                            // move the camera out 1000 and move it the to same y coordinate as the selected cube
                            //Tweener.addTween(camera, {x:1000, y:object.y, rotationX:0, time:0.5, transition:"easeInOutSine"});
                    private function moveBack(object:Object):void
                            // for each cube that was not selected, add the click event listener back
                            for each (var arrayPlane:Object in planeArray)
                                    if (arrayPlane != object)
                                            arrayPlane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                            // move the selected cube back to 0 and rotate 90 degrees once it has finished moving back
                            Tweener.addTween(object, {scaleX:1, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            Tweener.addTween(object, {scaleY:1, time:0.5, transition:"easeInOutSine", onComplete:rotateCube, onCompleteParams:[object]});
                            // set the cube's position to "in"
                            object.extra = {pIdent:"in"};
                            // move the camera back to its original position
                            //Tweener.addTween(camera, {x:0, y:1000, rotationX:-30, time:0.5, transition:"easeInOutSine"});
                            //right.enabled=true;
                            //left.enabled=true;
                    private function goBack():void
                            // for each cube that was not selected, add the click event listener back
                            for each (var arrayPlane:Object in planeArray)
                                    if (arrayPlane != object)
                                            arrayPlane.addEventListener(InteractiveScene3DEvent.OBJECT_PRESS, toggler);
                    private function rotateCube(object:Object):void
                            //object.rotationX = 0;
                            //Tweener.addTween(object, {rotationZ:0, time:0.5, transition:"easeOutSine"});
              private function addEventListeners():void{
        this.addEventListener(Event.ENTER_FRAME, render);
    //Enter Frame Listener function             
    private function render(e:Event):void{ 
                     renderer.renderScene(scene, camera, viewport);
                     camera.x = Math.cos(angleX) * 800;                                                  
                     camera.z = Math.sin(angleX) * 800;
    private function moveRight():void
              dest++;
              Tweener.addTween(this, {angleX:dest*anglePer, time:0.5});
              //goBack();
    private function moveLeft():void
              dest--;
              Tweener.addTween(this, {angleX:dest*anglePer, time:0.5});
              //goBack();
              ]]>
    </mx:Script>
              <mx:Canvas width="1014" height="661">
              <mx:Canvas id="pv3dCanvas" x="503" y="20" width="400" height="204" borderColor="#110101" backgroundColor="#841414" alpha="1.0" backgroundAlpha="0.57"> 
              </mx:Canvas>
              <mx:Button x="804" y="232" label="right" id="right" click="moveRight(),goBack()"/>
              <mx:Button x="582" y="232" label="left"  id="left"  click="moveLeft(),goBack()" />
              </mx:Canvas>
    </mx:Application>

    Your answer may be correct, but I am very much a beginner to actionscript, and I was wondering moreso if it is possible to determine the root/url (i.e. images/resolv2.jpg)? Or even if InteractiveScene3DEvent calls a variable that holds this url? However, specifically, I'm just wondering if the actionscript itself could determine the url in a line of code such as "if object == BitmapFileMaterial("/images/resolv2.jpg"); "? Also, here's a copy of InteractiveScene3DEvent in more detail if you think that will help:
    public class InteractiveScene3DEvent extends Event
                         * Dispatched when a container in the ISM recieves a MouseEvent.CLICK event
                        * @eventType mouseClick
                        public static const OBJECT_CLICK:String = "mouseClick";
                         * Dispatched when a container in the ISM receives an MouseEvent.MOUSE_OVER event
                        * @eventType mouseOver
                        public static const OBJECT_OVER:String = "mouseOver";
                         * Dispatched when a container in the ISM receives an MouseEvent.MOUSE_OUT event
                        * @eventType mouseOut
                        public static const OBJECT_OUT:String = "mouseOut";
                         * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_MOVE event
                        * @eventType mouseMove
                        public static const OBJECT_MOVE:String = "mouseMove";
                         * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_PRESS event
                        * @eventType mousePress
                        public static const OBJECT_PRESS:String = "mousePress";
                         * Dispatched when a container in the ISM receives a MouseEvent.MOUSE_RELEASE event
                        * @eventType mouseRelease
                        public static const OBJECT_RELEASE:String = "mouseRelease";
                         * Dispatched when the main container of the ISM is clicked
                        * @eventType mouseReleaseOutside
                        public static const OBJECT_RELEASE_OUTSIDE:String = "mouseReleaseOutside";
                         * Dispatched when a container is created in the ISM for drawing and mouse interaction purposes
                        * @eventType objectAdded
                        public static const OBJECT_ADDED:String = "objectAdded";
                        public var displayObject3D                                        :DisplayObject3D = null;
                        public var sprite                                                            :Sprite = null;
                        public var face3d                                                            :Triangle3D = null;
                        public var x                                                                      :Number = 0;
                        public var y                                                                      :Number = 0;
                        public var renderHitData:RenderHitData;
                        public function InteractiveScene3DEvent(type:String, container3d:DisplayObject3D=null, sprite:Sprite=null, face3d:Triangle3D=null,x:Number=0, y:Number=0, renderhitData:RenderHitData = null, bubbles:Boolean=false, cancelable:Boolean=false)
                                  super(type, bubbles, cancelable);
                                  this.displayObject3D = container3d;
                                  this.sprite = sprite;
                                  this.face3d = face3d;
                                  this.x = x;
                                  this.y = y;
                                  this.renderHitData = renderhitData;
    Thank you so much!

  • How Do I Know Which commandButton was Clicked in the Validation Phase?

    I have three <h:commandButton ... /> components in a single form. In order to implement some validation rules, I need to know which one was clicked. I cannot rely on the configured actionListener methods because they have not yet been invoked in the JSF life-cycle.
    It seems that the components representing each of these buttons get created and their values are all set to null. So that doesn't help.
    I could set a hidden field using a JavaScript onclick event handler, but that seems to be a hack for something that any decent web application framework should be able to handle elegantly.
    Thanks in advance for any help.
    Atif Faridi

    Thanks for the quick reply.
    I considered that, but ruled it out as an option because I was convinced that JSF would offer something better.

  • How to discover private field using reflect?

    Hi, all:
    i learned discover fields of a class by using reflect
    getClass().getFields()
    but it only works for public fields. how to discover all
    fields of a class?
    thank you in advance.
    kevin.

    I would not think that you would be able to use reflection to obtain private fields as even if you could get them, you cannot access them outside of the intansiated object of that type.
    what do you want them for?

  • How do I remap fields in Visio shapes when pointing to an external data source?

    Hi,
    I'm creating an organizational chart (org chart) in Visio. It refers to a SharePoint list. in the SharePoint list there is a column called FullName. This is the one I want to map to the Name field in a Visio shape. How do I remap fields in Visio shapes when
    pointing to an external data source?
    Learning SharePoint

    Mark,
    Unfortunately the required field/column names are hard coded in the add-in.
    al edlund
    Al Edlund Visio MVP

  • How to detect when new record is created?

    How can I detect when new record is created in PA30? For example, a newly create record for infotype 6 (address).
    Can I get the information in PCL4?

    Hi Irene,
    the field PAnnnn-AEDTM, nnnn is the infotype number, will give you the date when the record was last changed.
    Not sure if you can precisely get the date when the infotype was created. I dont feel the need to read cluster form the same.
    Regards,
    Pulkit

  • When-Mouse-Click does not fire if When-new-item-instance exists

    We are using Forms 6i Patch 12.
    The When-Mouse-Click trigger (at block level) is not getting fired when a When-new-item-instance trigger exists on a given item on which mouse is clicked.
    We need to synchronize keyboard and mouse events such that if the validation on certain key items fails, the cursor should go to one of the specified items as per the validation rules.
    The validation rules are different on leaving from different items. Complex validation rules require cursor to go to a different item than the current item on which the validation fires.
    Since go_item cannot be used in when-validate-item, we are using a combination of key-next-item and when-mouse-click.
    But, this strategy seems to fail if mouse is clicked over an item having a when-new-item-instance trigger.
    Also, we need the When-mouse-click trigger to fire before When-new-item-instance.
    Any pointers to solving the firing of trigger or strategy will be appreciated!
    Regards,
    Sanjiv

    This solution we have tried and it works also.
    However, we end up in another problem in the form. For overall picture, please see my latest post for "Forms Valid status" at Forms Valid status
    Regards,
    Sanjiv

  • How can I know which link was clicked in the link list

    Hi everyone
    I'm using list of links in my page to display list of the files in some directory.
    How can I know which link user was clicked. There are some code:
    <%
    String dir = "..//files//";
    File fin = new File(dir);
    File files[]=fin.listFiles();
    for(int i=0;i<files.length;i++)
    File x = files;
    %>
    <%=x.getName()%><br>
    <%
    %>
    Please help

    You need to pass some data on the querystring to the page you are linking to.
    <a href="Main_Work.jsp?file=<%=x.getName()%>"><%=x.getName()%></a><br>
    This will send a parameter called "file" with the value of the file name that the user clicked.
    Now in Main_Work.jsp you can access this data as follows:
    <%
    String s = request.getParameter("file");
    File f = new File("..//files//"+s);
    %>

  • HOW 2 FIND WHICH FIELD IS CONTAINED IN WHICH ALL TABLES?

    FRIENDS CAN U PLEASE TELL ME THE COMPLETE PROCEDURE FOR HOW 2 FIND THAT FIELD AUFNR IS IN WHICH ALL TABLES....I KNOW WE USE WHEREUSED LIST BUT HOW?
    REGARDS
    ESSAM ([email protected])

    Dear Khan,
    <b>--> Goto transaction SE16
    --> Give table DD03L (click --> table contents)
    --> give field name (Ex: AUFNR) & Execute
    --> And you will get all the table names.... which contain field AUFNR.</b>
    Reward Points for useful Answers.
    Regards,
    Moqeeth.

  • How to see which fields are called from a datasource?

    Hy Experts
    I have the datasource 8ZDS_DS02 and I want to know which fields in R/3 System are 'maped' to the infoobjects.  How can I do?
    Thank you in advance!

    if you have 8ZDS_DS02 as datasource, then you need to go to the update rule, Transfer rule of ZDS_DS02 and see what is being mapped to the datasource, whatever you see in 8* datasource is coming from the base ods which is ZDS_DS02.
    thanks.
    Wond

  • How to check which fields of a table are changed

    Hi
    I have a FM in which i pass VBAK and VBAP. I store records of table in internal tables and update the values during execution and at the end of this i have to cpmare VBAK and VBAP with internal tables to chcek which field value is changed in both VBAK and VBAP. Its not possible to check all fields bcause there are so many fields in VBAK and VBAP. Can any body help me.
    Thanks and Regards
    Aditya

    Hi,
    Try using where used list.
    click on the field. pree F1. select Technical Info from the pop-up. then from the field data, double click one the field name. it will navigate to the table/structure where the field is used. double click on the field there or
    press CntrlShiftF3.
    It will give you the where used list.
    Pls reward poins if useful.
    Regards,
    Chandru

Maybe you are looking for