Go_item

i have two blocks in one form master and detail
when i am entering data in
detail block first record data eneterd after this i press enter or tab
it will go on second record
what i want
when the second or third or more records first item is null or blank then the cursor move to button
where i write the trigger if possible give an example

if item_code is not null then
go_item('rec_qty');
else
go_item('add_button');
end if;
error is item_code must be declared
Edited by: user628902 on Oct 16, 2008 3:21 AM

Similar Messages

  • GO_ITEM is not working in trigger WHEN_VALIDATE_ITEM

    GO_ITEM is not working in trigger WHEN_VALIDATE_ITEM
    Here is my code...
    IF TRIGGER_NAME = 'WHEN_VALIDATE_ITEM' THEN
    FND_MESSAGE.DEBUG('Error!);
    GO_ITEM('abc.xyz');
    END IF
    After I clicked 'OK' on the message the GO_ITEM doesn't point to the desire item.
    Thanks.

    that's moroe than easy. Raise Form_Trigger_Failure :-)
    WHEN-VALIDATE-ITEM :
    BEGIN
      IF TRIGGER_NAME = 'WHEN_VALIDATE_ITEM' THEN
        FND_MESSAGE.DEBUG('Error!);
        IF something_goes_wrong THEN
          RAISE FORM_TRIGGER_FAILURE;
        END IF;
        One_Time_Timer.Initialize (Const.ott_Query);
      END IF
    EXCEPTION
      WHEN FORM_TRIGGER_FAILURE THEN
        RAISE;
    END;
    [(pre]
    try it
    Gerd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • In which trigger can i use go_item() in oracle forms 6i?

    Hi,
        I have a problem with go_item.
    I tried executing go_item() in triggers like key_next_item, pre_text_item, post_text_item & when_validate_item.
    But none of them seemed to be working.
    I searched for other possibilities in the site, where i found a solution of using trigger ' when_timer_expired ' with ' when_validate_item ' ,
    but when i tried to create trigger, i did not find that trigger (when_timer_expired)  in the list at all.
    I'm using oracle form builder 6i.
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production.
    A trigger with go_item() must be created when tab is pressed.
    In which trigger can i use go_item() ??
    Thank You.

    from help:
    Restricted Built-in Subprograms
    Restricted Built-ins affect navigation in your form, either external screen navigation, or internal navigation. You can call these Built-ins only from triggers while no internal navigation is occurring.
    Restricted Built-ins cannot be called from the Pre and Post triggers, which fire when Oracle Forms is navigating from object to another.
    Restricted Built-ins can be called from the When triggers that are specific to interface items, such as When-Button-Pressed or When-Checkbox-Changed. Restricted Built-ins can also be called from any of the When-New-"object"-Instance triggers and from key triggers.
    Unrestricted Built-ins do not affect logical or physical navigation and can be called from any trigger.
    The Built-in descriptions include a heading, Built-In Type, that indicates if the Built-in is restricted or unrestricted.

  • Execute_query and go_item

    Hello.
    I have a master-detail form.
    And i have key-exeqry trigger. Here i have execute_query built-in and then go_item.
    But when i execute_query, cursor doesn't jump to item i specified in go_item.
    For testing i created timer which waits for 1 second after execute_query. In when-timer-expired trigger i use the same go_item. After timer expires then go_item works.
    Can anyone help me with that? I don't want to use timer.
    Any idea?
    Thanks.

    Are you sure?
    I have seen the online help and there is nothing about it..
    Here is the online help.
    Post-Query Trigger Description
    When a query is open in the block, the Post-Query trigger fires each time Oracle Forms fetches a record into a block. The trigger fires once for each record placed on the block's list of records.
    Definition Level form or block Legal Commands SELECT statements, unrestricted built-ins Enter Query Mode no
    Usage Notes Use a Post-Query trigger to perform the following tasks: populate control items or items in other blocks calculate statistics about the records retrieved by a query calculate a running total When you use a Post-Query trigger to SELECT non-base table values into control items, Oracle Forms marks each record as CHANGED, and so fires the When-Validate-Item trigger by default. You can avoid the execution of the When-Validate-Item trigger by explicitly setting the Status property of each record to QUERY in the Post-Query trigger. To set record status programmatically, use SET_RECORD_PROPERTY . On Failure Oracle Forms flushes the record from the block and attempts to fetch the next record from the database. If there are no other records in the database, Oracle Forms closes the query and waits for the next operator action. Fires In Fetch Records Post-Query Trigger Examples Example This example retrieves descriptions for code fields, for display in non-database items in the current block. DECLARE CURSOR lookup_payplan IS SELECT Payplan_Desc FROM Payplan WHERE Payplan_Id = :Employee.Payplan_Id; CURSOR lookup_area IS SELECT Area_Name FROM Zip_Code WHERE Zip = :Employee.Zip; BEGIN /* ** Lookup the Payment Plan Description given the ** Payplan_Id in the Employee Record just fetched. ** Use Explicit Cursor for highest efficiency. */ OPEN lookup_payplan; FETCH lookup_payplan INTO :Employee.Payplan_Desc_Nondb; CLOSE lookup_payplan; /* ** Lookup Area Descript given the Zipcode in ** the Employee Record just fetched. Use Explicit ** Cursor for highest efficiency. */ OPEN lookup_area; FETCH lookup_area INTO :Employee.Area_Desc_Nondb; CLOSE lookup_area; END

  • Go_item(:detail.item) after query(F7) in master, frm-40737

    Dear friends,
    I have a master block and a detail block. When the master block ist queried, I want to go to a disticnt item in detail block, if there are records. Therefore I tried to put code in the post_query of the detail_block, which caused error frm-40737:
    if :evm_jn_lief_artikel_lagort.lagort_id is null then
    go_item('evm_a_liefrant.liefrant_uk');
    else
    go_item('lieferschein.belegnr')
    end if;
    error message says, that I cannot call the restricted procedure go_item in post_query.
    okay, but where can I put this code that it is called automatically after query?
    Thanks
    Silke

    Thank you I tried it, principally it works, but there is a problem left. This is my code in key_exeqry of detail:
    execute_query;
    message('execute_query, lagort_id: ' || :evm_jn_lief_artikel_lagort.lagort_id);
    message('execute_query, lagort_id: ' || :evm_jn_lief_artikel_lagort.lagort_id);
    if :evm_jn_lief_artikel_lagort.lagort_id is null then
         -- keine Artikel am lagerort
         go_item('evm_a_liefrant.liefrant_uk');
         message('evm_a_liefrant.liefrant_uk');
         message('evm_a_liefrant.liefrant_uk');
    else
         go_item('lieferschein.belegnr');
         message('lieferschein.belegnr');
         message('lieferschein.belegnr');
    end if;     
    When t´here are records in the detail block else is choosen, but forms doesn't go the item!
    The 'old' item (from where F8 was pressed) stays activated.

  • Weird LOV behaviour - delay when go_block,go_item

    Hi,
    I have a lov and after the user selects a value I go to another block and execute a query. Problem is that after I check the return value of show_lov and find it true, it takes some 3-4 secoonds for the code to execute if it had a go_item or go_block statement.
    To understand it better:
    a := SHOW_LOV('LOV_ALL_EMP');
         IF a = TRUE THEN
    IF HERE I PUT A GO_ITEM OR GO_BLOCK STATEMENT (WHICH IS NEEDED TO EXECUTE QUERY THEN) I TAKE A 3 SECOND DELAY FOR SOME REASON (ONLY AT THE FIRST GO_BLOCK OR GO_ITEM IF I HAVE 2 OR MORE I GET THE DELAY ONLY AT THE FIRST. OTHER STATEMENTS DONT STUCK.
    ELSE
    IF USER DOES NOT SELECT A VALUE DELAY DOES NOT OCCUR EVEN IF I USE GO_BLOCK
    END IF;
    To put it more generally:
    When I execute a the first GO_ITEM or GO_BLOCK statement AFTER the call of a LOV it seems to stuck for a little.. Even if statement refers to the block already focused. Also for the delay to occur, user have to select a value from LOV i.e. if user does not select a value (and show_lov returns false) this delay does not happen. Why?
    Any ideas on this strange behaviour please?
    regards,
    teo

    Well Steve,
    seems it's something like that. What I did is to check if it is the same on other PCs in here and it is the same, but unfortunatelly I wouldnt have the opportunity to check it on an OS other than XP home. Laptop I use for testing over the Web has Win 2000 but I use PSTN there so speed is totally different and I can't tell if there's a difference.
    Anyway I really don't have too much time to lose on that (it seems tricky) and moreover I don't think I'm using LOV in this case cause UI seems too poor for my requirements so I'll do a 'LOV' by myself.. So I will abandon this although its interesting. If later on I find anything else or be able to test it on another OS I'll get back on this post.
    I really appreciate your interest.
    For the history:
    Forms 9i on AS9i
    Win XP Home on which lies the AS9i (same used as a client)
    DB server 9i on other PC in the LAN

  • Go_item problem on stacked canvas

    Hello.
    I use stacked canvas in my form. On that canvas i have a button. User use this button to close stacked canvas. I use:
    hide_view('canvas_name');
    go_item('block.item_name');
    It seems as go_item is not working. Cursor only moves to the block and to the first item in that block.
    Why doesn't cursor move to item i choose?
    Thanks.

    Hello.
    It's still not working.
    And i'm not hidding first canvas.
    It is the main canvas. And on that canvas i press button to open small stacked canvas. And on that stacked canvas there is a button to close this canvas and to move cursor to one item on the main canvas. And that is not working. Cursor moves to the first block item on main canvas.

  • Go_Item Built In Behaviour

    Hello All,
    In Forms 6i i am trying to push the control to a particular item which is not in canvas and the control goes to the next available item in the block sequence which is available in the sequence but doesnt gives/throws any error. But the same form when compiled in 11g and executed it throws a error frm-40112
    How to get rid of this error, i did come across few threads with this environmental variable FORMS_REJECT_GO_DISABLED_ITEM but did not try it, please discuss how to overcome this issue.
    Thanks in advance

    Sounds like you have a Go_Item call that is referring to an item is not Enabled. Are you programmatically enabling and disabling items in your form?
    Craig...

  • **Urgent**: GO_ITEM to pop-up CANVAS with IMAGE in Sun JRE gives error

    Our Forms 10g Environment is this: Forms [32 Bit] Version 10.1.2.0.2 (Production) using Sun JRE i.e. Java Plug-in 1.6.0_06
    Problem is that when we try to navigate to a canvas (from a Button) which has an IMAGE ITEM the form is exited. This happens in every form which has a canvas with an image.
    i.e. In Button, we have code: Go_Item('block123.button1'). Button1 is also in that pop-up canvas.
    Even GO_BLOCK gives the same result.
    If the image is in the same canvas as the button which has GO_ITEM code, then it works.
    Of course this whole things works fine in JInit. But we need to run in Sun JRE.
    Is this a Bug?? Any help would be greatly appreciated.

    christian erlinger wrote:
    Well, as you are on 10.1.2.0.2 I strongly suggest that you apply the latest Patchset (10.1.2.3) the latest CPU Patches and the latest merge Patches. A lot of focus related things are fixed in those patches.
    cheersI will do this and let u know thans.

  • Cannot use GO_ITEM, GO_BLOCK in POST-CHANGE

    It is quite difficult to control the flow if I cannot use GO_ITEM, GO_BLOCK in POST-CHANGE trigger, is there alternative way?

    This really is an old chestnut. In the days of character mode many people used to put such code in key-triggers, which meant large numbers of triggers, possible loopholes, and a nightmare when it came to conversion to mouse navigation.
    After using various methods in the past, I have now standardised on using a FORM-LEVEL WHEN-NEW-ITEM-INSTANCE trigger in all of my new forms. Although I originally did this because I wanted to highlight the current field, I have since found it very useful for doing other things. If I want to navigate as a result of WHEN-VALIDATE-WHATEVER I set a variable to the name of the item I want to go to (could use a global but I prefer packaged variables). The W-N-I-I trigger reads the variable and does the GO-ITEM (and of course nullifies the variable).
    I also agree with Steve, POST-CHANGE is oldy-fashioned and not really the right thing to use.

  • Form Builder crashes when doing a compile all(ctrl+shift+k) after adding a go_item

    I am stumped. I have a procedure that is populating certain blocks based on where the cursor is in a tree. This procedure works great. My form compiles without any problems. If I then add a call to the go_item built-in and then try to compile my form, Form Builder crashes. I tried adding this go_item to the top of the procedure as well as the bottom of the procedure. This makes no sense to me. I can do a CTRL + T without any problems, but when I do a CTRL + SHIFT + K, it crashes with the following:
    IFBLD60 caused an invalid page fault in module NLSRTL33.DLL at 017f:60d2352c.
    Registers:
    EAX=00000000 CS=017f EIP=60d2352c EFLGS=00010246
    EBX=00000000 SS=0187 ESP=007e52e8 EBP=007e52ec
    ECX=007e532c DS=0187 ESI=00000000 FS=10ef
    EDX=00832554 ES=0187 EDI=050028e8 GS=0000
    Bytes at CS:EIP:
    8a 10 88 11 8a 10 41 40 84 d2 75 f4 8b 4d 14 2b
    Stack dump:
    00827af0 007e53b0 5da01008 007e532c 00000000 00832554 00832400 007e5814
    00833c20 007e5810 00000004 00000000 00000003 0508cd14 00000000 05002e88
    Any help would be greatly appreciated. Has anyone else every seen this problem.
    We have had crashes in the past that were with this same DLL.
    Whenever we try to do a Find and Replace PL/SQL..., we get the following:
    "IFBLD60 caused an invalid page fault in module NLSRTL33.DLL at 017f:60dld397." It then lists some register stuff." We had a TAR out on this problem and Oracle was unable reproduce our problem (TAR #1420237.996).
    We have version 3.3.3.0.0 of that DLL. Is it possible that we have a bad version?
    null

    Tina,
    My suggestion might work for you.
    I had similar issue. What I did was:
    1. Open the form after connecting to DB.
    2. Do a <Compile All> 2 times.
    3. ie., First time, do a <compile all>
    4. Immediately do another <Compile All>
    5. Now Save and then Generate.
    Just give a try, if u need,
    null

  • LOV problem regarding go_item

    Hallo Friends,
    i have two datablock, each containing some text field, In first datablock i have one Text field cointaining LOV, After select the specific value from that LOV, i want to set that value in that text field and set focus on next field present in next or another Block.
    Thanks.

    Hi,
    The Auto Skip property will navigate to the next navigable item. And if you want to specify to which item you want to navigate, then you have to write in the KEY-LIST-VAL trigger of the item.
    DECLARE
         Bln_Temp BOOLEAN;     
    BEGIN
         Bln_Temp := SHOW_LOV('<lov_name>');
         GO_ITEM('<block_name>.<item_name>')
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • Go_Item With On-error

    Hi,
    When the user missing some fields for enter ,So we have to use go_item procedure but go_item with on-error is not working.
    how i can handle this problem?
    Regards,

    Trapping invalid data entered is typically done in a When-Validate-Item (WVI) trigger assigned to the particular item. If an invalid value is entered, simply fail the form and there is no need to force the navigation cursor back to the failed item because you are already there. ;) If you need to send the user to a different item, you'll have to do this in a Timer as the Go_Item and Go_Block built-ins are classified as "Restricted Built-ins" and the WVI trigger only allows SQL Statements and calls to "Unrestricted Built-ins". For example:
    /* Sample item When-Validate-Item trigger */
    BEGIN
       IF ( /*Logic to test validity = FALSE */) THEN
          -- Value enter is not valid for the item.
          Message('Value entered is not valid!');
          Message('Value entered is not valid!');
          /* Fail the form so the user has to correct the value */
          RAISE Form_Trigger_Failure;
       ELSE
         /* Value entered is valid, let the user continue */
         -- Appropriate code here if value is valid
       END IF;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Go_item problem

    Hi,
    I have two different modules. One is customer module and other one is main menu module. Now when I click on customer button in main menu module the customer form comes up, but the cursor does not go to customerID, which is should when i do go_item. If you can help me out with the syntax i will appreciate it. So far i have go_item(customer.customerID) and it is giving me this error error 357 table, view, or sequence reference 'CUSTOMER.CUST_ID' not allowed in this context. Any help will be appreciated. Thanks

    Hi,
    you call go_item(customer.customerID) but receive an error message saying table, view, or sequence reference 'CUSTOMER.CUST_ID' not allowed in this context. Now how can the error message refer to a different input argument than the go_item() call. I assume that the problem is somewhere else than in the buoöt-in call, which should be
    go_item('customer.customerID');
    Frank

  • Pre insert ,,go_item

    Hi all
    i have created a new field in the existing table with data
    I have made the field as non mandatory .
    On the form i have added the field
    i want to make this field as mandatory now .
    hence i have added the code in the pre insert and pre update trigger .
    till here it works fine
    now i have written a go_item in the pre insert and pre update to navigate to the item after the error
    but it gives me error that go_item not allowed in preupdate .
    is there any workaround by which i can navigate to the item for entering the value if it is left blank ?
    plzz help me
    mandar

    So on new records and records where the user changes any field you want to make sure they have entered a value in a particular field. The best way to do this is to use the 'Required' property.
    I created a new form (forms 10.1.2) with a block based on the EMP table, and set the COMM item to 'Required'. This column is non-mandatory in the database and has a mixture of null and not-null entries, just like yours. In the when-validate-item trigger at block level I used this:
    Set_Item_Property('EMP.COMM',ITEM_IS_VALID,PROPERTY_FALSE);so if the record is changed then the COMM item will be validated when the user moves away from the record.
    The default behaviour is for forms to move the cursor to the null field and prompt the user. To change that prompt, I changed the block-level on-error trigger to this:
    DECLARE
     lv_errcod NUMBER := ERROR_CODE;
     lv_errtyp VARCHAR2(3) := ERROR_TYPE;
     lv_errtxt VARCHAR2(80) := ERROR_TEXT;
    BEGIN
     IF (lv_errcod = 40202) THEN
      /* field must be entered */
      IF :system.trigger_item = 'EMP.COMM' THEN
       message('Please enter a Commission value',acknowledge);
      ELSIF :system.trigger_item = 'EMP.EMPNO' THEN
       message('Please enter an Employee Number',acknowledge);
      ELSE
       message('Please enter a value for '||:system.trigger_item,acknowledge);
      END IF;
     ELSE Message(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt);
      RAISE Form_Trigger_Failure;
     END IF;
    END;It works fine. The only functional difference between my approach and yours is that I warn the user when they leave the record and you warn them when they save the record.
    On using the pre-insert trigger for this, I'd say that it's usually not a good idea to validate in triggers other than the validation triggers (eg when-validate-record) or to override the forms default validation.

Maybe you are looking for

  • Getting Error while test executing the Web-Dynpro object.

    Hi All,,,,,,,, I am new to Web-dynpro and this is my 1st demo application. Application simply contains two Views : First used to submit a field which is collected in the second view for display. While test runnning the application as: Web Dynpro_Comp

  • Data stuck-up in ALE inbox

    Hi guys, The data idoc has arrived for the hierarchy but not available in infobject, infact the update  mode is ale inbox and infoobject, is there a way to push the data from ale to the infoobject hierarchy from R/3. Thanks, Your help is greatly appr

  • SAP VOFM

    I have a require  where a text message will popup when a user tries to insert a new line item into an existing sales order. (VA02). This popup message is stored in customer master text field. I have a require to write small code using VOFM text. The

  • Muse forms hosted on BC and embedded in Muse website hosted on third party host

    Just wondering if there are any plans for Muse forms to be hosted on BC and able to embed on Muse website that is on a third party host? If this is already possible... how?  I know of another company that allows for forms (using their separate web fo

  • N96 pc suite problems

    when i connect my usb to my n96 it keeps trying to look for a wlan connection or tmobile internet. why does it keep doing this? it was working fine up until a week ago please help as i need to transfer photos and videos