Force exit form when I am in query mode.

I have created one button just launch Exit_Form built_in. Ok my forms exit, but when I stay in query mode, I need to click at button twice, first to abort query, the second time to exit form. How can I configure that to close my form automatically?
I have tried Abort_Query folling Exit_Form, but does not work as well.
Thanks all.

In the trigger that contains the EXIT_FORM check for if you are in ENTER_QUERY mode. If you are issue two EXIT_FORM otherwise one.

Similar Messages

  • Forms that start in enter query mode freeze on exit

    When a headstart form is called from
    a menu and the first thing it does if go into
    enter query mode the form will not exit properly, causing the orginal form to hang.
    Is there any work around for this apart from taking enter_query out of the when_new_form_instance trigger ?

    We have a similar problem with a Headstart generated application. We are unable to pinpoint it entirely to forms that start in enter query mode as:
    a) forms that don't start in enter query mode also hang; and
    b) not all forms that start in enter query mode do hang.
    The problem doesn't seem to affect a form consistently, as one day it will hang on the first use, the next it will work for several hours.
    When a new form is selected from the menu the toolbar is not shown, the 'start' form disappears and the application hangs. It is then necessary to close the application using Task Manager.
    The good news is that this only seems to happen in our development environment (Windows NT 4) and not in our live environment (Hydra).
    We are working with Headstart v2.1.2.0.1,
    Designer v2.1.24.1.0 and Forms v5.0.6.11.0.

  • 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

  • Form trigger - fire in enter query mode

    Hello,
    Could someone help me with the following problem, please?
    I want to create an key-exeqry and I want it to execute in enter-query mode. Unfortunatly Designer set's the property 'fire in enter query mode' for the trigger to 'No'. I can't find any setting to set it to 'Yes'. Does someone knows a setting or a work-around?
    I'm working with designer6/headstart6.
    Thanks in advance,
    Martine.

    Sandra,
    I tried to put the key-exeqry in the template. There's only one problem the key-exeqry is a 'in place of' trigger. When I put the code 'Null;' in the trigger, a generated form without a key-exeqry doesn't work because the 'key execute query' does nothing. A generated form with a key-execute query works fine.
    At the other hand, when I put the code 'Execute_query' in the trigger, a generated form without a key-exeqry works fine, but the other one doesn't.
    Which code should I include in the template-trigger?
    Thanks,
    Martine.

  • How to disable field validation when block is in query mode ?

    Hi,
    we use Jdev 11g TP3 and implemented a button to set a block of input fields in query mode.
    Some of this fields are mandatory.
    When performing an execute operation this mandatory fields are validated and the JS error message pops up.
    In query mode this fields must not be mandatory !
    How to disable the validation of those mandatory fields when the block are in query mode?
    BR
    Peter

    Hello Peter,
    A little correction to Chris' suggestion, it should be:
    <af:inputText value="#{bindings.<your field name>.inputValue}"
                        label="#{bindings.<your field name>.hints.label}"
                        required="#{!bindings.<your iterator name>Iterator.findMode && bindings.<your field name>.hints.mandatory}">
    ...etc...The only difference is the removal of the ? : operator since it isn't required and represents both an additional parsing and processing effort. Go micro-optimization!
    ~ Simon

  • Set search text when form is in query mode

    Hi forum members,
    is it possible to set the value of a textfield when a form is in query mode?
    In our form you can enter query mode with F7 and execute the query with F8.
    When you go back to query mode with F7 and then press F7 again, the search criteria of the past query appears.
    Now in our form there is an alternativ search, that can be executed in query mode with F9. A different search canvas appears then with a more detailed search.
    When I go back from that canvas to the initial canvas, change to query mode with F7 and try to get the last search criteria with F7, not the last search criteria (from F9 search) appears, but the first one (F8 search).
    I have tried to copy the search value into an invisible textfield and then copy it back to the search field when F7 is pressed after the alternative search canvas was closed.
    Instead of appearing in the search field, a new record is created in background.
    Is there any other way to set the value of a textfield in query mode?
    Thanks,
    Marco

    Hi Craig,
    thank you for this hint.
    Unfortunately it does not solve my problem.
    My goal is to fill the search fields with values when they are in query mode.
    I try to explain it step by step:
    Step 1
    - In my Form I change to query mode with F7.
    - I fill a search field, e.g. Name: TIGER.
    - Then I execute the search with F8.
    - Record is displayed in the block
    Step 2
    - I press the F7 Button to change to query mode again
    - Now when I press F7 again, the search values from the last search (TIGER) appear (I think it is a standard forms functionality, isn't it?)
    - I execute the search with F8
    - Record is displayed
    Step 3
    - Again I change to query mode with F7
    - I fill the search field (this time Name: SCOTT)
    - Now advanced search is executed with F9
    - A special search canvas opens over the form with result records and more detailed information to the result
    - I close the search canvas
    Step 4
    - Again I change to query mode by pressing F7
    - I want to get the search value from the last search (SCOTT) by pressing F7 again
    - Value from the first search appears (TIGER)
    My goal is to save the search value from step 3 anywhere (in a variable or copy field or something) and get it back in step 4 when the form is in query mode.
    It seems to me that it is not possible to fill fields that are in query mode, is that right?
    Thanks a lot!
    Marco

  • How to put the form in Query mode

    Hello
    Please let me know how to put the form or block in Query mode , so that when i run the form it should be in Query mode . I have seen properties of SET_FORM_PROPERTY and SET_BLOCK_PROPERTY but cannot find one
    Thanks

    QUERY mode? Did you mean, that you can only QUERY without changing data.
    This is the QUERY-ONLY-mode, which can be started e.g. call_form
    this is the help for that topic:
    PROCEDURE CALL_FORM
    (formmodule_name VARCHAR2,
    display NUMBER,
    switch_menu NUMBER,
    query_mode NUMBER,
    data_mode NUMBER,
    paramlist_name VARCHAR2);
    query_mode     
    NO_QUERY_ONLY (The default.) Form Builder will run the indicated form in normal mode, allowing the end user to perform inserts, updates, and deletes from within the called form.
    QUERY_ONLY Form Builder will run the indicated form in query-only mode, allowing the end user to query, but not to insert, update, or delete records.

  • FRM-41361 Cannot navigate out of current form in Enter-Query Mode

    Hi All,
    I am getting the FRM-41361 error in the bottom message area when opening a form from the function navigator. The issue does not exist when opening the form from the application homepage. The form is loaded in enter-query mode, and the enter_query command is in the WHEN-NEW-FORM-INSTANCE trigger. I have checked all triggers that fire after this point for any type of navigation but do not see any. The interesting thing is, if I put a fnd_message.set_string and fnd_message.show just before the enter_query call to debug, the issue goes away entirely.
    Is it possible there are security triggers firing after the form is loaded into enter-query mode that could be causing this and that the fnd_message calls are indeed buying time for those triggers to complete before the enter_query call?
    Any help/advice is appreciated. Thanks!
    Dan

    Yes, when I looked through the triggers I made sure to look for go_block and go_item calls as well as any calls to leave the form.

  • Open multiple forms, few in Enter-Query mode

    Hi All,
    I want to open multiple forms from a form using open_form built-in. If user clicks on different items of the parent form different child forms are invoked.
    But if one child form is opened in Enter-Query mode (I have 'enter_query;' in its when-new-form-instance) it does not allow to put focus back on parent form and invoke other forms until I execute_query in child form or close the child form.
    Waiting for your replies. Thanks in advance.
    Regards
    Mona

    Hi Friends,
    Has anybody ever faced this problem. Please reply.
    Regards

  • FRM:41361 Cannot navigate out of form in 'Enter Query Mode'

    Hi,
    I am using a master - detail block in my form.When I query the master block I am getting this error message
    FRM:41361 Cannot navigate out of form in 'Enter Query Mode'
    I have given DO_KEY('ENTER-QUERY') in WHEN-NEW-BLOCK-INSTANCE trigger of master block.
    and in property palette of Master block I have given the next navigation block as Detail block.
    According to the value which is queried in Master Block the Detail block should be populated.
    My form should open in 'Enter Query Mode'.This problem always happens from second time onwards
    I open the form.When I open the form first time this problem is not occuring.
    Can anyone suggest a solution for this
    Thanks,
    Nasiya

    Have you written a Key-EntQuery trigger at the Master block or the form level,
    If yes, then can you put that code here.
    The NEXT-NAVIGATION-BLOCK is only used for navigation when you use a next-block built-in on a key-trigger.
    Have you written a ENTER-QUERY command on any trigger that fires prior to the said WHEN-NEW-BLOCK-INSTANCE trigger?
    If yes, then thats the reason that the first time you run the form, your form is in ENTER-QUERY mode.
    Also, maybe execute on enter-query fails and hence the blocks are not getting populated.
    Also, ENTER-QUERY is always on a single block. And while the block is in enter-query mode, navigation out of that block is prohibited.
    you have to either have a successful EXECUTE-QUERY or use:
    EXIT_FORM(NO_VALIDATE) to come out of ENTER-QUERY mode.

  • LOV in Query mode

    Hi,
    I have a form which when the user enters query mode, the user should be able to access the LOV attached to the 3 fields that are on the header level. On selection the values should be populated in the fields. The 3 fields are in a query only block.
    If I use Show lov, and i make a selection, i get an error message saying that you cannot insert records.
    Any thoughts ?
    Preeti

    hai,
    Its not possible.
    Because the date control is actually a seperate block, and in Query mode, we cannot more to a separate block.
    Regards,
    Manu.

  • Using Enter-Query Mode Programmatically

    A question was raised in an earlier thread
    QUERY CRITERIA MANAGER
    about how to use Enter-Query mode programmatically in a way that doesn't stop
    and prompt the user to enter a query after switching from Normal mode to Enter-Query mode.
    Since the solution may not be widely known, I thought I'd demonstrate the technique here in a new thread.
    Create a simple form with just two blocks. Using the data block wizard, create an EMP block with one
    text item for ENAME. Place it on the canvas. Create the other block as a control block and name it CONTROL.
    Inside the control block create the following items:
    - create a text item named TXT_BOX
    (The user will enter their search pattern criteria in this text box while in Normal mode.)
    - create a push button item named EXECUTE_QUERY
    (This button will switch to Enter-Query mode, execute the query, then return to Normal mode.)
    Place both control items on the canvas.
    Inside the WHEN-BUTTON-PRESSED trigger for the EXECUTE_QUERY button, enter the following code:
    DECLARE
         timer_id TIMER;
    BEGIN
         :GLOBAL.search_criteria := :CONTROL.TXT_BOX;
         GO_BLOCK('EMP');
         timer_id := CREATE_TIMER('ENT_QRY', 1500, NO_REPEAT);
         -- 1500 may be a little long, but provides a margin of error
         ENTER_QUERY;
    END;
    Next, create a WHEN-TIMER-EXPIRED trigger at the form level. Inside this trigger enter the following code:
    If GET_APPLICATION_PROPERTY(TIMER_NAME) = 'ENT_QRY' THEN
         :EMP.ENAME := :GLOBAL.search_criteria;
         EXECUTE_QUERY;
         IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
              EXIT_FORM; -- return to Normal mode
         END IF;
    END IF;
    GO_ITEM('CONTROL.TXT_BOX');
    Now, when the user runs the form and logs into the SCOTT schema, he enters a search criteria
    such as A% in the TXT_BOX while in Normal mode. Then clicks the EXECUTE_QUERY button.
    The form will switch to Enter-Query mode, retrieve all names in ENAME that begin with the letter A,
    and then return to Normal mode without pausing for the user to enter a search criteria.
    If the query should happen to fail, the form displays the error:
    "FRM-40301: Query caused no records to be retrieved. Re-enter."
    then switches automatically back to Normal mode so the user can try entering a new criteria.

    I'm showing how to do it when switching modes. I'm
    not suggesting this is the best way to do a query.We need to look at this in the context of the original probelm in the thread linked to above. For most cases the when-timer-expired etc is just a huge detour around using the pre-query trigger but it's an interesting approach to the specific problem in the earlier thread. The OP there wanted to be able to type '>5000' into a number field in a non-database block, which we can do in a database block in enter-query mode, and use it as a query parameter in the database block. Perhaps if we enter this into a character field in the non-database block and populate the numeric field in the database block whilst in enter-query mode then we can do searches on ranges of data? Unfortunately it doesn't work - you get an ora-06502 error just like you do when using the pre-query trigger. For the situation in the original thread you would have to use a 'default where'.

  • Enter-Query Mode

    I'm interested in starting a discussion on the restrictions of
    Enter-Query Mode, principally, why can you not navigate to a
    query only block whilst in this form mode? I have successfully
    implemented an full Query functionality without using the
    default forms behaviour, and wonder if there are any
    disadvantages that I have overlooked.
    null

    Kannan T. (guest) wrote:
    : Hi Steve,
    : Can you make your quest/requirement more clear and detailed,
    so
    : that I will be able to discuss with you for each specific
    : points.
    : With best regards,
    : Kannan
    Hi there,
    Its quite involved, I have some documentation that goes some way
    to describing the problem/solution, but briefly I find that when
    in 'Enter-Query' mode (system.mode = 'ENTER-QUERY') there are
    two restrictions
    1) You cannot navigate to another block. This is useful in a
    number of cases, like if you want to implement a more powerful
    List of Values facility, or provide the user a seperate screen
    to build up complex query criteria
    2) If you write a trigger that uses 'enter_query' built in,
    processing stops at this point. The standard workaround for this
    is to start a timer before the call to 'enter_query', and when
    the timer expires it performs the processing you want to do
    after 'enter_query'.
    So, I decided to rewrite the default forms enter/execute query
    processing (which was pretty straightforward), so my forms never
    go into 'Enter-Query' mode. What I am interested in is if there
    is anything that using the default forms processing gives, that
    I may have missed!
    Regards Steve
    null

  • Swith from query mode to insert mode

    Hello I am calling a form with this
    CALL_FORM('f11105.fmx', hide, do_replace, query_only, MY_LIST_PARAM);
    In the New-Form-Instance of form f11105.fmx I would like to switch to from query_only mode to not_query_only mode following instructions that can only be executed in query mode.
    How can I do that ?
    thanks

    If I use this to call my form, it will work and display the content of the block ATTRIB
    CALL_FORM('f11105.fmx', hide, do_replace, query_only, VC_LIST_PARAM); but this can only be used to modify not to insert a new record
    If I use this , which allows me to insert a new record, the content of the block ATTRIB is not displaying :
    CALL_FORM('f11105.fmx', hide, do_replace, no_query_only, VC_LIST_PARAM);
    I read in the doc that Go_Block can not be called from a trigger when Form Builder is in Insert/Query mode      so I thought that this was the reason of my problem and I was thinking that If I could swith from query_only mode to no_query_only mode
    It could solve my problem . I would call the form with
    CALL_FORM('f11105.fmx', hide, do_replace, query_only, VC_LIST_PARAM);
    do this in the when-new-form-instance of f11105.fmb :
    GO_BLOCK('ATTRIB');
    EXECUTE_QUERY(ALL_RECORDS);
    first_record;
    and swith back to no_query_only after
    What do you think? thanks
    Message was edited by:
    user470010

  • Exiting form after being in query mode

    Hi guys,
    Having an issue with some forms after migrating from forms version 6i to 10g. Learning as I go along.
    Forms which startup in query-mode seem to have an issue when closing - all have two blocks - one block is utilised through user query and the other (like a child) displays the query results and can be updated from here. If the user does not enter a query they can cancel it using exit_form which works fine.
    After a query has been completed the system mode returns to 'normal' mode (which I can see through debugging by entering messages/pauses throughout the code). However when exiting the application breaks with error FRM-92100. I have had this problem before with regards to exiting forms but I got round this by having an open window (acting as a parent or root window) in the background which is not closable. Been tweaking the form all afternoon including using exit_form(no_validate) and other changes. By commenting out enter_query and execute_query commands the form closes as normal without issue which means it is related to query mode or something along these lines.
    If anyone has any ideas or pointers on how to move forward with this it would be much appreciated.
    Cheers,
    Robin

    Guys,
    Thanks for the replies.
    The form currently uses exit_form twice in order to close the query mode and I receive a message "query cancelled" to confirm this.
    I have also tried - and retried for the benefit of confirming this - the code you have mentioned u3 - using it in the when-window-closed trigger. I chose &lt;option&gt; to be no_validate.
    The main app is opened from a webpage. Forms are opened from a menu which is attached to all forms. The code that opens the forms is open_form (i.e. not call_form or new_form) for modal reasons.
    The application is disconnected straight after exit_form is used - its as if coming out of query-mode to normal causes this as I said before closes gracefully when I remove the enter_query command.
    As for the error message itself here is a fuller picture:
    FRM-92100: Your connection to the server was interrupted. This may be the result of a network error, or a failure on the Server. You will need to reestablish your session.
    Details...
    java.lang.NullPointerException
    at oracle.forms.handler.TextComponentItem.selectionChanged(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextComponent._fireSelectionChanged(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextComponent.select(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextField._selectAll(Unknown Source)
    at oracle.ewt.lwAWT.lwText.LWTextField.processFocusEvent(Unknown Source)
    ...AND SO ON!
    Hope this gives a better picture of what's going on :)
    Robin
    update - There is a 'dirty' workaround to this problem - if i minimize the window (change its state in any way) after the mode is back from query-mode to normal THEN close the window it closes gracefully.
    Edited by: Robin84 on Sep 10, 2008 10:03 AM

Maybe you are looking for

  • How to import an .csv file into the database?

    and can we code the program in JSP to import the.csv file into the database.

  • Dual Monitor support on thin-clien​t

    Company provides thin client (T5520) for work at home environment.  Security provides for no local storage, no driver additions or software/windows configuration.  Is there a way to support dual monitors?  Perhaps using device such as DualHead2go by

  • Apps download & upgrade problem...

    Using a torch 9800 & recntly every time I try to download, upgrade a game or app it starts then stops saying, there was a problem during installation please try later. Have tried to restart but its no use, help!

  • Landed Cost Error "Some rows could not be calculated weight data is missin

    Friends,    I am facing an error "Some rows could not be caluculated weight data is missing [Message 922-7], I have defined the weight in Item Master in Both Purchaing and Sales Data tab. Faisal Baloch

  • Issues in performance

    Hello I had an web template which has 9 reports into it. we were having some performance proble while executing the template,It took 50 seconds to 70 seconds initially. Then we created aggredates, Compressed the request , then i filled the OLAP cache