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 --

Similar Messages

  • 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;

  • 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

  • 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.

  • Change Value of Veriables in Enter-Query mode

    hi all
    I have made a search utility on a table, there is reqirement that in the enter-query mode the user can enter any combination of character, in simple words there is requirement of %% at begining and at end of desired search field.
    as :system.last_query gives the value like
    SELECT ROWID,SEQ_NUM,TAG
    FROM sequel1.sequelsql WHERE ( UPPER(TAG) LIKE :1 and (TAG LIKE :2 or TAG LIKE :3)) order by TAG
    how to pad % sign in the veriables :1,:2 and :3 as need to search
    tag like ('%ASSESSMENT%')
    thanks in advance

    SELECT ROWID,SEQ_NUM,TAG
    FROM sequel1.sequelsql WHERE ( UPPER(TAG) LIKE :1 and (TAG LIKE :2 or TAG LIKE :3)) order by TAG
    1.
    have you tried to handle the items contents in a PRE-QUERY trigger ?
    If blk.item IS NOT NULL Then
       :blk.item := '%' || :blk.item || '%' ;
    End if ;2.
    You could change the WHERE clause (or the ONETIME_WHERE)
    in your KEY-EXEQRY trigger:
    Declare
       req   Varchar2(512) ;
    Begin
      req := '( UPPER(TAG) LIKE %' || :blk.item1 ||
    '% and (TAG LIKE %' || :blk.item1 || '% or TAG LIKE %' || :blk.item3 ||'%)) order by TAG ;
      Set_Block_Property( 'blk', DEFAULT_WHERE, req ) ;
      Execute_Query ;
    End ;Francois

  • LOV button in enter query mode

    Hi
    How do I show LOV button(Forms 9.0.2) in enter query mode?As of now LOV button is displayed only in the create mode.
    Binod.

    Hi Andrew,
    Thanx for the reply. Actually I have not associated any trigger for this. Here Im refering the LOV button which comes inside the respective field(I mean we change the property lov_button to 'true in the regitry.dat). This button is not getting displayed in the enter query mode.
    I hope now you are clear with the query.
    Binod.

  • 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;

  • Enter Query mode to Normal Mode

    In my form i have a modify button. After clicking the modify mode, the mode will be enter-query. I have a number field. After entering the number i will be prompting the user to select yes or no from an alert. If he is selecting yes i will execute query modify save.. no problem.
    If he is select no.. i am populating the values from a procedure.. i want to insert a new record.. but now i want to change the enter query mode.. how do that...
    If i am using Exit_form; the populated details are getting cleared..
    please help me..

    Hi,
    Try using Abort_query. Hope it will help you.
    Regards
    Gaurav Thakur

  • Blocking some fields from entering in summary block in enter query mode

    Hi ,
    I have a data block where in some fileds have to be dynamically allowed to enter and some are not based on
    a particular condition. The problem is whenever the forms enters enter query mode, all the fileds in the block are updateble. Even maually I tried to set/unset the property in forms using set_item_property, but the enter query mode was trying to overiride it and making updateble.
    Please suggest a solution for this.
    Thanks in advance.
    Thanks,
    Lohith

    Try the below code
    IF  :SYSTEM.MODE='ENTER-QUERY' THEN
    SET_BLOCK_PROPERTY('BLOCKNAME',INSERT_ALLOWED,PROPERTY_TRUE);
    SET_BLOCK_PROPERTY('BLOCKNAME',UPDATE_ALLOWED,PROPERTY_TRUE);
    SET_BLOCK_PROPERTY('BLOCKNAME',DELETE_ALLOWED,PROPERTY_TRUE);
    you can set the item here too by using the below code
    SET_ITEM_PROPERTY('BLOCK.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
    SET_ITEM_PROPERTY('BLOCK.ITEM_NAME',UPDATE_ALLOWED,PROPERTY_TRUE);Regards
    Moazam
    Edited by: Moazam Shareef on Oct 6, 2010 6:10 AM

  • FRM-40200 and FRM-40501 in Enter-Query-Mode

    Some strange behaviour in Enter-Query-Mode:
    Although the help states
    About Designing Forms for Querying+
    +.. To make a "query-only" block, set Query Allowed to Yes and Delete Allowed, Insert Allowed, and Update Allowed to No. ..+
    I get FRM-40200: Field is protected against update.
    System.Mode says, we are currently in ENTER-QUERY.
    Setting insert- and update-allowed to TRUE, I get
    FRM-40501: ORACLE error: unable to reserve record for update or delete.
    The entered character flashes and is erased immediately.
    Any ideas?
    Forms 10gR2
    Items are base table, all transactional properties aund query_allowed are true, query_length is ok.
    2 Things that happen before the initiation of the enter-query-mode:
    . data-source is changed to another view; column names are ok.
    . all block-items are disabled and not navigable at start-up of form and re-enabled and made navigable before entering the block.
    The values of block and item-properties mentioned above are take at WHEN-NEW-ITEM-INSTANCE and no further trigger fire.

    I think you are not meaning just the KEY-ENTQRY-Trigger, that to easy
    IF INSTR(:SYSTEM.TRIGGER_BLOCK, '_DETAIL') = 0
    +               AND :SYSTEM.TRIGGER_BLOCK NOT IN ('VZG_KOPF','KONTROLL','BUTTONS','TEMP')+
    THEN
    +     ENTER_QUERY;+
    END IF;
    .. but the rest is a lil bit, let's call it bulky; including pll and db-packageges.
    I hoped to get a clue, if somebody has a similar expeience, in what direction to search. It's strange.
    And, as I noticed today, it's not a problem of all forms of the app. Not even of all the forms called from the same "environment" (same globals, same menu-form from which they are opened). To me it looks like Enter-Query does not work in the forms where I switch the block-data-source from a view to a globally temporary table. That (this switching) is not a new feature and Enter-Query worked in the past. Althoug we had some changes in the temp tables in the last weeks there are no problems in querying the data in the forms. Recompilation of pll and fmb, no improvement. And either Enter-Query woks in a form or it does not.

  • Disableing an item in enter query mode

    Hello experts,
    i want that a perticular item will be disabled after you press enter button of query menu.(or query->enter).Can any body please tell me what is the actual trigger in which i write the disable statement.
    set_item_property('itemname', enabled, property_false);
    Regards
    Anutosh

    You can't set the enabled property if the cursor is in the item and I expect it's the same for the query_allowed property. if the cursor is in the item which you set to Query_Allowed=false and then you go to enter-query mode, perhaps forms doesn't know what item to move the cursor to, so just leaves it where it is.
    You can solve the problem by moving to a different item (with go_item) before setting the property.
    When do you need to set the item back to enabled? If you want it enabled at all times other than when a query is being entered then use the Property Pallet to set the Query Allowed property. If you want to disable the field under certain conditions then the when-new-record-instance trigger might be better for you. Eg
    if :system.mode = 'ENTER-QUERY' and <condition> then
      go_item(<another item>);
      set_item_property(<item>, enabled, property_false);
    else
      set_item_property(<item>, enabled, property_true);
      set_item_property(<item>, update_allowed, property_true);
      set_item_property(<item>, navigable, property_true);
      set_item_property(<item>, update_null, property_true);
    end if;It might be better to set the query_allowed property instead of the enabled property, but I can't check right now whether that's possible after the enter-query mode has begun.
    The update_allowed, update_null and navigable properties are all set to false as a consequence of the enabled property being set to false. If they should be true then you need to reset them after reenabling the item.

  • 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

  • Hotkey "Create Record" while the form is in enter-query-mode

    pressing the hotkey F6 for create-record while the block is in enter-query-mode results in the error - message:
    Function key not allowed. Press Ctrl+F1 for list of valid keys.
    The error-occurs although I created a trigger KEY-CREREC. The trigger isn't executed
    In older Forms versions the behaviour was different. Is there a way to let the form work like in the old versions?

    thnx for reply.Problem not solved.
    i m trying to assign the value of text item to a variable in pre-query trigger. i m able to get the value into variable when the string in the text item does not startwith <,>,=. but when the string starts with any one of the operator (<,>,=) it gives error.
    lenth of variable is 1000 charaters, and text item's max leanth is just 4 charactres.

  • How to cancel the sales order - header and line status are in Entered Stage

    Dears,
    I have some sales order to be cancelled in which the header and line status are in *"Entered"*. I am not able to cancel these sales order.
    Also note that these orders are for maintenance service.Once i book these orders the lines will change to closed status.
    So it is not possible to book and cancel the lines.
    Kindly me to resolve this.

    926530 wrote:
    Boss,
    If i do Action-->cancel on header, it just makes the qty to zero.But the header and line status still showing as entered.It will not cancel the order.
    The problem for me is that these lines are coming in my monthly reports. This is what your question says...be more specific as what is your issue..which in turn is your problem
    How to cancel the sales order - header and line status are in Entered Stage
    Coming to your Action-->cancel...as far as i know ...the header status will change to canceled..
    unless until you have some processing constraints in place...which is stopping you...
    HTH
    Mahendra

  • 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.

Maybe you are looking for

  • Since upgrading to Firefox 4 I can no longer send a link to a web page. I use Windows XP. Can anyone please help?

    I have used Firefox for some time and have enjoyed the bsend a link feature in the File drop dwon menu. Since installing Firefox 4 this feature no longer works. I click the option and nothing happens. In preferences and applications the mailt0 icon o

  • User Parameter ID 'blank'

    Hi experts I wish to know if there is a value to set a parameter ID "blank" (or to delete the values for the fields who SAP ECC memorize after a registration). My problem is: I have to register movements with the VLMOVE transaction and ECC memorize a

  • UpdateCharacterStream for LONG column gives SQLException: Data size bigger than max

    I have a LONG column and when I call updateCharacterStream via the resultset I get the following error: SQLException: Data size bigger than max size for this type: 2391 I am trying to update the column with a value that is 2391 in length. The column

  • SKYPE INSTANT MESSENGER FROM AN ANDROID THAT DOES NOT HAVE THE SKYPE APP

    I HAVE A LENOVO HARD-WIRED TOWER & WINDOWS 8.1 OPERATING SYSTEM. MY FRIEND, DAVE, HAS AN ANDROID PHONE - HIS PHONE DOES NOT HAVE SKYPE INSTANT MESSENGER, BUT ANOTHER INSTANT MESSENGER THAT SHOWS A LIGHTNING BOLT. DAVE IS ONE OF MY SKYPE CONTACTS. WHE

  • Good receipt details

    Hi experts, Iam trying to extract the data from good receipt(MIGO). In my document number there is no Material existing.But material description is existing. Where can i find this material description for the particular document number? Is there any