How to cancel query in Enter Query mode programmaticaly? [SOLVED]

I'd like to put the button in the block and fire trigger to cancel query similar as in DEFAULT&SMARTBAR menu Cancel Query button. Is this possible at all?
Thanks!
m.
Edited by: marussig on Dec 4, 2009 6:40 PM
Edited by: marussig on Dec 10, 2009 10:17 PM
Edited by: marussig on Dec 11, 2009 7:02 PM

Hi,
When I click icon enter query on Oracle DEFAULT&SMARTBAR menu and then click icon execute query on Oracle DEFAULT&SMARTBAR menu, everything is OK.
But, if I put button, and trigger WHEN-BUTTON-PRESSED on it and command ENTER_QUERY in plsql code of this trigger, click the button and then click the second button to execute query with plsql command EXECUTE_QUERY - it doesn't work.
So I have two buttons:
1. button, WHEN-BUTTON-PRESSED trigger has command ENTER_QUERY
2. button, WHEN-BUTTON-PRESSED trigger has command EXECUTE_QUERY (this second command doesn't work)
Or: how can I programmatically execute command EXECUTE_QUERY when the block in is query mode?
thanks
m.

Similar Messages

  • Excute Query And Enter Query

    Dear all
    I am using forms10g.
    I have two buttons...one is Enter Query and another is Execute query.
    In Execute query i have written
    GO_BLOCK('Emp') ;
    Execute_Query;
    It is working Fine..
    And in Enter Query Button i have written
    go_block('T_BRAND');
    Enter_query;
    When i press Enter Query Button and giving Some value then pressing Execute button then it is not showing any value.
    It is showing press CTRL F11 to excute. When i press CTRL f11 then it is executing the block
    So what should i write in the Execute button ?

    For that i have written Go_block('T_brand'); execute_query;Something must be wrong. Wrong spelling of the block? What about the code you posted before. There was some GO_BLOCK('EMP'); in it? Do you have a block EMP
    But it is not working.What does that mean? Do you get any error? Check the Menu Help->Show Errors

  • How to cancel conference phone 8831 linked mode

    I used two conference phones 8831 to setup  linked mode in one big  meeting room  for testing last month. 
    Now I installed one of them in another small meeting for testing.
    the keypad unit screen show me that it trying to config link mode.
    I tried to erase the phone setting, but it still occurred....
    Does anyone can tell me how to fix this problem? thanks. 

    Hi Alex,
    Please move this to IP telephony Community to get experts in 8831 phones to help you. This community is for Cisco WebEx Meetings Server and Cisco Unified MeetingPlace products.
    Kind regards,
    -Dejan

  • How to cancel a query when execute query builtin fire and No Records found.

    Hi,
    I am unable to cancel a query when i make query (fire enter-query) then fire (execute-query) and no records found then the form status is enter-query mode. Plz help me that how can i back to normal mode of form.
    here i use the code for coming back to enter-query to normal mode but no results.
         if :system.mode = 'ENTER-QUERY' THEN
    ABORT_QUERY;
         clear_form;          
         END IF;
    thanks in advance....

    Hello,
    I would test the record status of the first record in the block. If this status is 'NEW', then there is no record retrieved, so that you can exit the query mode with exit_form()
    Francois

  • Starting form in Enter-Query mode disables some buttons on Smartbar

    Whenn I run a form (on the Web) which starts in Enter-Query mode, the buttons "Execute Query" and "Enter Query" are disabled on the Smartbar. Also the corresponding menu options are disabled. Besides, it is psossible to use the appropiate keys (in my case: F7 and F8).
    Has anyone experienced the same problem and is there a solution?
    Let me know.
    Thanx

    Frank: Thats what i thought too -but i saw (in other Sources) that it could be done, but how..
    Eugeniy I Duzhinskiy:
    So, many Thanks to you. It works fine !!!!
    (Its great to see there are some other Forms Users out there :) )

  • Enter Query Mode with Block Based on Stored Procedure

    How can I get the ENTER QUERY mode to work when the data block is based on a stored procedure?

    Thank you for your review.
    Because the package is long, I stripped most of it out, but left the basics. After I stripped out the code, I ran the new code under a new user. Under the new user I built I new form, tested it, and I still cannot use the ENTER QUERY mode to retrieve the correct record. Query always returns the first record. I have included table structure and 3 test records.
    CREATE TABLE FR_Charge      
    (      FR_Charge_ID               NUMBER(8),
         FR_Charge_Code               VARCHAR2(8) CONSTRAINT FR_Charge_Code_nn NOT NULL,
         FR_Charge_Code_DESC          VARCHAR2(35),
         FR_Charge_Code_CMT          VARCHAR2(50),
              CONSTRAINT FR_Charge_pk PRIMARY KEY (FR_Charge_ID)
    CREATE SEQUENCE FR_Charge_SEQ;
    INSERT INTO FR_Charge
    VALUES(FR_Charge_SEQ.NEXTVAL,'0.0WS','E-Mail Notification', NULL);
    INSERT INTO FR_Charge
    VALUES(FR_Charge_SEQ.NEXTVAL,'0.1', 'Shipping', NULL);
    INSERT INTO FR_Charge
    VALUES(FR_Charge_SEQ.NEXTVAL,'0.12', 'Shipping Charges', NULL);
    --Package follows
    CREATE OR REPLACE PACKAGE DataCard_Pkg
    AUTHID CURRENT_USER
    AS
         -- The following records defines the data structure needed by the FR_Card.
         TYPE FR_Charge_Record IS RECORD
         (     FR_Charge_ID                    FR_Charge.FR_Charge_ID%TYPE,
              FR_Charge_Code                    FR_Charge.FR_Charge_Code%TYPE,
              FR_Charge_Code_DESC               FR_Charge.FR_Charge_Code_DESC%TYPE,
              FR_Charge_Code_CMT               FR_Charge.FR_Charge_Code_CMT%TYPE
         -- REF CURSOR definition used by the query procedure.
         TYPE FR_Charge_REFCUR IS REF CURSOR RETURN FR_Charge_Record;
         -- INDEX OF TABLES used for the DML Operation procedures.
         TYPE FR_Charge_Table IS TABLE OF FR_Charge_Record
              INDEX BY BINARY_INTEGER;
         --Define Procedure Specifications
         PROCEDURE FR_Charge_Query (DMLResultSet IN OUT FR_Charge_REFCUR);     
         PROCEDURE FR_Charge_Lock (DMLResultSet IN OUT FR_Charge_Table);
         PROCEDURE FR_Charge_Insert (DMLResultSet IN OUT FR_Charge_Table);
         PROCEDURE FR_Charge_Update (DMLResultSet IN OUT FR_Charge_Table);
         PROCEDURE FR_Charge_Delete (DMLResultSet IN OUT FR_Charge_Table);
    END DataCard_Pkg;
    CREATE OR REPLACE PACKAGE BODY DataCard_Pkg
    AS
         PROCEDURE FR_Charge_Query (DMLResultSet IN OUT FR_Charge_REFCUR)
         IS
         BEGIN
              OPEN DMLResultSet FOR
              SELECT FR_CHARGE.FR_Charge_ID,
                   FR_CHARGE.FR_Charge_Code,
                   FR_CHARGE.FR_Charge_Code_DESC,
                   FR_CHARGE.FR_Charge_Code_CMT
         FROM FR_Charge;
         END FR_Charge_Query;
         PROCEDURE FR_Charge_Lock (DMLResultSet IN OUT FR_Charge_Table)
         AS
              x_index NUMBER := 1;
              x_count NUMBER := DMLResultSet.COUNT;
              x_dummy_var VARCHAR2(1);
         BEGIN
              FOR x_index IN 1..x_count LOOP
                   SELECT 'X'
                   INTO x_dummy_var
                   FROM FR_Charge
                   WHERE FR_Charge_ID = DMLResultSet(x_index).FR_Charge_ID
                   FOR UPDATE NOWAIT;
              END LOOP;
         END FR_Charge_Lock;
         PROCEDURE FR_Charge_Insert (DMLResultSet IN OUT FR_Charge_Table)
         AS
              x_index NUMBER := 1;
              x_count NUMBER := DMLResultSet.COUNT;
         BEGIN
         FOR x_index IN 1..x_count LOOP
              INSERT INTO FR_Charge
              (      FR_Charge_ID,
                   FR_Charge_Code,
                   FR_Charge_Code_DESC,
                   FR_Charge_Code_CMT
              VALUES                               
              (     FR_Charge_SEQ.NEXTVAL,
                   UPPER(DMLResultSet(x_index).FR_Charge_Code),
                   DMLResultSet(x_index).FR_Charge_Code_DESC,
                   DMLResultSet(x_index).FR_Charge_Code_CMT
              END LOOP;
         END FR_Charge_Insert;
         PROCEDURE FR_Charge_Update (DMLResultSet IN OUT FR_Charge_Table)
         AS
              x_index NUMBER := 1;
              x_count NUMBER := DMLResultSet.Count;
         BEGIN
              FOR x_index IN 1..x_count LOOP
              UPDATE FR_Charge
                   SET FR_Charge_Code = UPPER(DMLResultSet(x_index).FR_Charge_Code),
                   FR_Charge_Code_DESC = DMLResultSet(x_index).FR_Charge_Code_DESC,
                   FR_Charge_Code_CMT = DMLResultSet(x_index).FR_Charge_Code_CMT
              WHERE FR_Charge_ID = DMLResultSet(x_index).FR_Charge_ID;
              END LOOP;
         END FR_Charge_Update;
         PROCEDURE FR_Charge_Delete (DMLResultSet IN OUT FR_Charge_Table)
         AS
              x_index NUMBER := 1;
              x_count NUMBER := DMLResultSet.Count;
         BEGIN
              FOR x_index IN 1..x_count LOOP
                   DELETE FROM FR_Charge
                   WHERE FR_Charge_ID = DMLResultSet(x_index).FR_Charge_ID;
              END LOOP;
         END FR_Charge_Delete;
    END DataCard_Pkg;

  • Problem in enter query mode

    Hello Oracle experts,
    When I do some query in enter query mode more than the required no.
    of rows are appearing in detail block. For example If we have only 2 rows in detail table corresponding to one row in master then only those two rows should appear in detail block during query which are related to the corresponding master block record. But more rows are appering. What may be wrong please guide.
    Thanks in advance
    Ajay

    Hi Ajay,
    Is your relation between the two blocks applied correct?
    Grtz.

  • How to Cancel The ‘Enter Query ’ mode?

    Please help me to Cancel the �Enter Query� mode.

    Have a look at the Exit_Form Built In help.
    Description
    Provides a means to exit a form, confirming commits and specifying rollback action.
    n     In most contexts, EXIT_FORM navigates �outside� the form. If there are changes in the current form that have not been posted or committed, Form Builder prompts the operator to commit before continuing EXIT_FORM processing.
    n     If the operator is in Enter Query mode, EXIT_FORM navigates out of Enter Query mode, not out of the form.
    n     During a CALL_INPUT, EXIT_FORM terminates the CALL_INPUT function.
    Syntax
    PROCEDURE EXIT_FORM;
    PROCEDURE EXIT_FORM
    (commit_mode NUMBER);
    PROCEDURE EXIT_FORM
    (commit_mode NUMBER,
    rollback_mode NUMBER);
    Built-in Type restricted procedure
    Enter Query Mode yes
    -- Shailender Mehta --

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • How to exit from Enter-Query mode

    Hi
    I am not being able to exit from the Enter-Query mode if the result set is not returned.
    I tried to exit using ABORT_QUERY, exit_form( as we used to do in earlier version) and CTRL+Q. Nothing seems to work and I have to kill the form
    This seems to be an easy topic, but I need your help.
    Thanks in advance
    Bijay

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by bj ():
    Hi
    I am not being able to exit from the Enter-Query mode if the result set is not returned.
    I tried to exit using ABORT_QUERY, exit_form( as we used to do in earlier version) and CTRL+Q. Nothing seems to work and I have to kill the form
    This seems to be an easy topic, but I need your help.
    Thanks in advance
    Bijay<HR></BLOCKQUOTE>you maybe include a not null item,you can set the item's property
    not need .
    null

  • EXIT_FORM in enter query mode

    Hi Guys,
    I have a button on my form to exit the form code is:
    EXIT_FORM(No_Validate);
    when my form is in enter query mode the button does not work. i have to cancel the query first and then the button works.
    How can i change my mode to exit form even if it is in enter query mode.
    Please help its urgent.
    thanks , Imran Baig

    HI Imran,
    That is quite normal. If you press CTRL/Q, it executes an implicite Key-EXIT trigger. If you are in Enter Query mode, this will close the query and does nothing else. When you execute it again, you leave the from without validation.
    My suggestion were: Place the exit_form(no_validate) twice in your trigger--the second would be absolute harmless, since the form will no longer be active, provided you came from Normal Mode. Otherwies, it will force leaving the form by first closing the query and then leaving.
    Regards, Miklos Herboly.

  • Suppress the enter-query mode when no-data-found after execute a query.

    HI,
    Greetings of the day, Can any one suggest me that how to Suppress the enter-query mode when no-data-found after execute a query on the form by a button.
    whenever i execute query on form and result is no data found then form :system.mode is still in enter-query mode.
    i want that if result is no data found then form comes back it initial state.
    i will thank full of him who will help me..
    Thanks in Advance..

    Put this in your Key-ExeQry trigger:Execute_Query;
    If Get_block_property(:System.current_block,query_hits)=0 then
      Exit_form; --this cancels the Enter-Query mode; Does not exit the form.
    End if;You may want to trap and prevent the "FRM-40353: Query cancelled" message, and change the "FRM-40301: Query caused no records to be retrieved. Re-Enter" message. To do that, you need an On-Message form-level trigger:Declare
      Msg_Code Number        := MESSAGE_CODE;
      MSG      Varchar2(150) := SUBSTR('   '||MESSAGE_TYPE||'-'
                             ||TO_CHAR(Msg_Code)||': '||MESSAGE_TEXT,1,150);
    BEGIN
      If Msg_Code=40301 then
           -- 40301: Query caused no records to be retrieved. Re-Enter
        Message('  NO RECORDS FOUND',No_acknowledge);
      Elsif Msg_Code=40353 then -- Query cancelled.
        null;
      Else
        MESSAGE(MSG,NO_ACKNOWLEDGE);
      End if;
    End;

  • Exiting from a Block that is in Enter-Query Mode

    hello,
    can anybody show me how to cancel the query of block "x" and go to block "y", when block "x" is in enter-query mode, and the user navigates using the mouse to a field in block "y".
    thanks

    Hi, Samir
    Please create the following WHEN-MOUSE-CLICK trigger in your second block.
    If you don't want to activate enter-query mode when you click on the second block, simply remove the "enter-query;" line below.
    if :system.mode = 'ENTER-QUERY' then
    declare
    oldmsg varchar2(2);
    begin
    oldmsg := :system.message_level;
    :system.message_level := '10';
    exit_form;
    :system.message_level := oldmsg;
    end;
    next_block;
    enter_query;
    end if;When the mode is ENTER-QUERY, some built-in routines change their behaviour. EXIT_FORM; is used to cancel the enter-query mode.
    Hope this helps,
    Pedro.

  • How to implement enter-query , execute-query in Apex Forms

    Hi,
    I am new to Oracle Application Express. I want to know what is the equivalent of ENTER-QUERY and EXECUTE-QUERY features of Oracle Forms in Oracle APEX? I saw a lot of documentation, but everywhere I found that APEX forms only have 3 database actions, (1) INSERT (2) UPDATE & (3) DELETE.
    Does anybody know how we can do QUERY in APEX Forms? (like we do in Oracle Developer Forms).
    Thanks in advance.

    Oracle APEX is a web/ stateless environment. So you do not have the same functionality/ features as in a Oracle Forms environment which is session/state oriented.
    You can however achieve functionality similar to Enter Query / Execute Query through other means.
    The easiest is to use the Forms with Report wizard. It creates 2 pages, the first one is a report and the other a Form. Clicking on the Report rows takes you to the Form page in Edit mode where as the the Create button takes you to the Form in Insert mode.
    If you want to have the enter-query / execute query on a single page it will require significant effort and skills. Try it when you have acquired some more skills in Apex.
    In APEX , like any other web application, you have to think in the web paradigm and not client-server. Even Forms 11g is essentially client-server like and is session oriented through the forms applet.
    Regards,

  • Disabling LOVs when not in enter query mode

    hello. I currently have a form in which a master block populates a detail block. when the master is populated the cursor automatically goes to the detail block and sets it to enter query mode (due to the face that there are multiple details but the user may only view one at a time). To select the appropriate detail the user may select the detail from a LOV which is activated by clicking a button. once the detail has been selected and the query executed there is no real need for the LOV as the user can now edit/delete the detail. Also when adding a new detail there would be no need for the LOV as the presence of it would only confuse users. So basically the only time the LOV is usefull is during query mode to query the detail the user wants to edit/delete.
    In your experiance how would you acheive this result?
    Any help would be greatly appreciated.
    Thanks

    well you can write a trigger Key-listval on your LOV item to check the mode of the block
    if :system.mode = 'ENTER-QUERY' then
        list_values;
    end if;LOV will only display in enter query mode only

Maybe you are looking for

  • ITunes error 7 windows error 14001

    i recently installed itunes on my computer, a successful installation actually... no errors. after that itunes didn't run and popped up error 7, as well as itunes helper and every time i boot my windows it pops up... the thing is, not only itunes was

  • SSD and HDD / TimeMachine and CCC

    I have a 240GB SSD as my main drive and it had all of my data on it. Recently I installed the OWC data doubler and put a 500GB HDD in place of the superdrive. Since then, I copied my "home" folder (under /Users) to the new 500GB HDD. After this I wen

  • Is there a way to see who else got a mass text?

    I keep getting pictures attached to messages that were sent to me and other people. Then I get responses from people I don't know about the same message. I don't mind it and am more than willing to ignore the extra messages. I would just like to know

  • New Text Field To Be Added in Audit Management

    Hi All, I need to create new text fields in addition to the existing fields in Audit Management screen for all the audit components in the TEXT TAB in transaction PLMD_AUDIT. I would like to know is it possible or not and if not possible then what is

  • Export to Excel Functionality in SPM

    Hi When we are trying to export any report in excel in SPM it is currently giving the report in CSV format. We want the report to be downloaded in excel format. Is there a fix available? Regards Neel