Create_record in enter_query mode

Dear members,
(Forms 6i c/s)
In enter_query mode, when the user wants to create a new record, I'd like to exit from the mode and create the record.
But "create_record" (F6) is not allowed in this mode, so it doesn't get to the key-crerec trigger. Thus I can't find a place to put my "exit_form / create_record" code.
Any idea ?

Unfortunately, a lot of triggers ignore the "Fire in Enter-Query Mode" property, and apparently you have stumbled into one of them. Forms was written by humans and they make mistakes -- someone probably decided that no matter what, since you couldn't create a new record legally in Enter-Query mode, that they should disable the key-trigger. Too bad.
I tried to get the Key-Crerec trigger to work here and had no luck. I'm afraid you're going to have to try a button and When-button-pressed trigger.

Similar Messages

  • How to pass the global variable in enter_query mode

    Dear Friends
    I am calling the form and in enter_query mode ,but my global variable is not pass to the form when it is in enter_query mode , me be the field is clear after the enter_query is called ,in which triger do I have to keep my variable
    :H_DOC_CODE := :global.offer_no ; so that it will be assign to the field
    :H_DOC_CODE this my script is keept in
    WHEN-NEW-FORM-INSTANCE.
    waiting for your valuable answer.
    best regards
    Jamil Alshaibani
    -- this my script
    DECLARE
         V_STATUS NUMBER;
    BEGIN
         :system.MEssage_level := 25;
         :GLOBAL.V_STATUS := 0;
         CLEAR_FORM(NO_VALIDATE);
         enter_query ;
    :H_DOC_CODE := :global.offer_no ;     
    END;

    I'm not quite sure what you mean with
    But the document number is not pass to the called form field and : H_DOC_CODE is a field in the called form.Do you want that the form is in ENTER-QUERY-mode and the field H_DOC_CODE contains the field of the GLOBAL?
    Or do you want to automatically execute a query with that H_DOC_CODE.
    For the first, you have to assign the global in the WHEN-NEW-RECORD-INSTANCE-trigger instead of the PRE-QUERY:
    IF :SYSTEM.MODE='ENTER-QUERY' THEN
      :H_DOC_CODE :=:global.offer_no ;
    END IF;For doing an automatic query the suggested solution with the PRE-QUERY-trigger is right, but you would have to issue an EXECUTE_QUERY in the WHEN-NEW-FORM-INSTANCE instead of an ENTER-QUERY.

  • Call_form from menu when in enter_query mode

    I was wondering if headstart has a setting that allows the user to open another form from the menu even when it is in enter_query mode.
    I can see in the libraries that when a form is closed this mode is checked and exit_form is called twice when the form is in enter_query mode but the call_form procedures do not seem to have this check.
    I am also not sure how to implement this myself, since calling exit_form in a menuitem also exits the piece of code, so any call_form or open_form call is not reached after the first exit_form.
    Has anyone had this challenge before and if so, how did you solve it?
    Thanks
    Message was edited by:
    Wendy Tromp

    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.

  • Push button in enter_query mode

    Hi all !
    I've got the following Problem in Forms 4.5:
    When i enter the query mode with "enter_query",
    i cant push any other (user defined) button i have placed on the form (other Blocks). Thats my problem....
    It seems, that my buttons have to belong to the "Query-Block" (because if so-it works).
    But i have got some other forms sources - and in these forms the buttons DONT belong to the Query-Block and i CAN push the Buttons in ENTER_QUERY - Mode.
    Please, can somebody can give me e hint .... ??

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

  • Function keys in enter_query mode

    Dear members,
    (Forms 6i c/s)
    Function keys have different behaviors in enter_query mode: some are allowed (F1), some are forbidden (F6), some are unused (F2).
    It seems that I can't use a KEY-F* trigger to intercept the function key behavior and make it do something else when I'm in enter_query mode.
    Typically, I'd like to make those keys exit from the mode before doing their action.
    Where and how could I do that ?
    Thanks.

    Hi Matthias,
    first, think about:
    KEY-F6 is not the Shortcut F6 (the KEY-F6 is only usable/matchable via OracleTerminal)
    KEY-CREREC is F6 (default-windows)
    second:
    The disabled F6-key in enter-query mode is a new feature of Forms6i. Forms 4.5 and older aren't disallowing this key. This is a very tricky (and not a good) feature of Forms6i.
    I think, that you have no chance of using these keys in enter-query. That behaviour seems to be hard coded deep in the source of Forms6i...

  • Open a form in enter_query mode

    Qs no:1:- I want to open a form in enter_query mode.
    Qs no:2 :- after they query 4 fields(blk1) ...depending on that the rest of the informative part of that form(blk2) gets populated.
    Now user hit OK (push button).
    Now all the fields should be blanked including those 4 fields and the informative part and the form should stay at enter_query mode.
    FYI:- There is no master-detail relation between two blocks.blk2 gets populated when user puts data in the 4th field and press tab ...
    I have written the code to populate the informative part in when-validate-trigger of the 4th text field.
    How can I do that?
    please suggest..
    Edited by: 977083 on May 13, 2013 4:59 AM

    Hello,
    Switch to enter query mode at the end of the When-New-Form-Instance trigger:
    Go_Block('the_block_to_query');
    do_key('enter_query');Francois

  • Exit_Form in Enter_Query Mode Problem

    Hi Guys,
    I have written this code in my when_new_form_instance
    Enter_Query;
    now when the form runs its in Enter Query Mode.
    I also have a Exit button on my form with code
    Exit_Form(No_Validate);
    if user runs the form, and without executing the query s/he wants to exit, the exit button is not working. First s/he has to execute the query or cancel the query.
    How can i programatically control this situation on my exit button.
    I dont want to write Exit_Form twice in a button, suggest any other solution pliz.
    Best Regards,
    Imran Baig

    In your Exit button's WBP trigger, do this:If :System.mode = 'ENTER-QUERY' then
      Exit_Form;
    End if;
    Exit_Form(No_Validate);To get the button to work while the form is in enter-query mode, it must be in the same block as the one being queried, or else you must set its Mouse Navigate property to No.

  • SHOW LOV IN ENTER_QUERY MODE BY USING WHEN_BUTTON_PRESSED TRIGGER

    HI ALL...
    I HAVE A CANDIDATE BLOCK. IN ENTER QUERY MODE BY PRESSING f9 KEY I AM ABLE TO SEE
    THE LOV BUT WHEN PRESSING THE PUSH BUTTON ITS NOT COMING
    BY USING SHOW_LOV BUILT IN..
    PLEASE HELP ME..
    ASAP

    Ok..The key navigable and mouse navigable properties of buttons were yes.
    Thats why it was not working ..now its working by changing it..any way thanks a lot.
    Thanks
    Sam......

  • Date format mask in Enter-Query mode

    Hi,
    I'm developing a Form which is able to query the masterblock from a detail-item.
    The queryable detail-item is a date field and has a datatype: DATETIME. When a new record is entered the values in the date field are stored in the database like "18-10-2002 15:04:02"
    When the form is in enter_query mode the user must be able to enter 18-10-2002 (DD-MM-YYYY format mask, so without time mask). When execute the query with this date format the query is not able to find data.
    I used a Key-Execute-Query on the detailblock like this:
    SELECT 1.COLUMN
    , 2.COLUMN
    INTO :1.COLUMN
    , :2.COLUMN
    FROM TABLE.1
    , TABLE.2
    WHERE 1.COLUMN = 2.COLUMN
    AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    Can anyone please help me?
    Regards,
    Ronny.

    Hi Ronny,
    I'm not sure to have got exactly your issue (especially why you have to use that select in master-detail query), but I suggest you to substitute
    ...AND TO_CHAR(1.COLUMN,'dd-mm-yyyy') = to_date(:avg.datum,'dd-mm-yyyy');
    with
    ...TRUNC(1.COLUMN) = TO_DATE(:avg.datum,'dd-mm-yyyy');
    To be fair, I would use it in the where clause, even if you set it dinamically.
    Let us know,
    Marco

  • Change background color in enter-query mode

    Hi everyone,
    I am trying to Change background color in enter-query mode in forms10g. I am using this
    Set_Item_property('org.branch_code', BACKGROUND_COLOR, 'Green' );
    Thanks

    This is the code that allows to colorise items in enter_query mode, then de-colorize them after execute_query.
    Assume that you have created a VA_QUERY visual atribute in your module.
    -- Colorise in enter-query mode --
    PROCEDURE Start_query IS
      LC$Block      Varchar2(30) := Name_in('system.trigger_block') ;
      LC$item       varchar2(60);
      LC$itemdeb    varchar2(60);
      LN$len        pls_integer ;
    BEGIN
      lc$itemdeb := get_block_property(LC$BLOCK, FIRST_ITEM) ;
      lc$item := LC$BLOCK || '.' || lc$itemdeb ;
      while lc$itemdeb is not null Loop
        IF GET_ITEM_PROPERTY(LC$Item , ITEM_TYPE) NOT IN ('BUTTON','RADIO GROUP','DISPLAY ITEM') Then
          IF GET_ITEM_PROPERTY(LC$Item , QUERYABLE ) = 'TRUE' Then
            set_item_property(LC$item, CURRENT_RECORD_ATTRIBUTE, 'VA_QUERY');
          End if ;
        End if ;
        lc$itemdeb := get_item_property( lc$item, NEXT_NAVIGATION_ITEM );
        lc$item := LC$BLOCK || '.' || lc$itemdeb ;
      end loop ;
    END;
    -- Unclororize after execute_query --
    PROCEDURE End_query IS
      LC$Block     Varchar2(30) := Name_in('system.trigger_block') ;
      LC$item     varchar2(60);
      LC$itemdeb     varchar2(60);
      LN$len          pls_integer ;
      LN$Multi  pls_integer ;
    BEGIN
      lc$itemdeb := get_block_property(LC$BLOCK, FIRST_ITEM) ;
      lc$item := LC$BLOCK || '.' || lc$itemdeb ;
      LN$Multi := GET_BLOCK_PROPERTY(LC$Block , RECORDS_DISPLAYED ) ;
      while lc$itemdeb is not null Loop
        IF GET_ITEM_PROPERTY(LC$Item , ITEM_TYPE) NOT IN ('BUTTON','RADIO GROUP','DISPLAY ITEM') Then
          IF GET_ITEM_PROPERTY(LC$Item , QUERYABLE ) = 'TRUE' Then
             If LN$Multi > 1 Then
                set_item_property(LC$item, CURRENT_RECORD_ATTRIBUTE, 'VA_CURRENT_RECORD');
             Else
                set_item_property(LC$item, CURRENT_RECORD_ATTRIBUTE, '');
             End if ;
          End if ;
        End if ;
        lc$itemdeb := get_item_property( lc$item, NEXT_NAVIGATION_ITEM );
        lc$item := LC$BLOCK || '.' || lc$itemdeb ;
      end loop ;
    END;Francois

  • Exit from a Form in enter_query

    hi there
    i have a form (form6) with a master-detail.
    the 2 blocks are table-based.
    when the form open, it must be in enter_query mode, so in when-new-form-instance i wrote an enter_query.
    how can i manage the exit form when it's in enter_query mode?
    now i should press the key-exit 2 times...
    thank you

    Hello
    after few attempts (the message "query cancelled" was still appearing), i solved putting this code in the key-exit trigger of the master block
    declare
         msglvl varchar2(3);
    begin
         msglvl := :system.message_level;
         :system.message_level := 20;
         if :system.mode = 'ENTER-QUERY' then
         exit_form(NO_VALIDATE,FULL_ROLLBACK);
         end if;
    :system.message_level := msglvl;     
         EXIT_FORM(ASK_COMMIT,FULL_ROLLBACK);
    end
    thank you all

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

  • Calendar enter query mode problem

    I have successfully implemented the calendar utility supplied by
    the demo.
    However, has anyone figured out how to use it when in
    enter-query mode? It doesn't work because you can't navigate
    out of current block when in enter_query mode.

    In your Exit button's WBP trigger, do this:If :System.mode = 'ENTER-QUERY' then
      Exit_Form;
    End if;
    Exit_Form(No_Validate);To get the button to work while the form is in enter-query mode, it must be in the same block as the one being queried, or else you must set its Mouse Navigate property to No.

  • Simple Enter_Query ?

    Hello-
    I'm trying to get my form to be in ENTER_QUERY mode as soon as you enter the form. Any help would be appreciated.
    Thank you-
    John

    Hi, Jirtme
    Just for the record, when you enter a form with absolutely no triggers, the mode is NORMAL. That means you can do several things:
    a) You can write something in the first item (Forms assumes you are inserting a new record).
    b) You can issue an execute query command (by trigger, button, key, menu item). This will issue a query on the base table table, and fetch enough records to fill the block.
    c) You can issue an enter query command (again by several ways). This will enter a special mode, where everything you enter on your items is taken as criteria, in order to build the where clause).
    As you might have guessed by my lengthy explanation, I'm an Oracle trainer.
    Hope this helps,
    Pedro.

  • Enter_query and execute_query progrmatically

    I would like to place a button on my form that esential will
    allow the user to press this button rather then hitting F7 and
    F8 to query. The problem is that when you got into enter_query
    mode you can not navigate to another block which then means that
    I when i click my button to execute the query I am not able to.
    It is not feasible to place the button as the same block i want
    to query because of the fact that it displays multiple records
    which means it would display my button 5 times. How can I
    achieve this?
    Thanks
    Spencer Tabbert
    null

    You could use stored procedures and pass a where clause to the
    query_procedure. Oracle's has limitations in handling operators
    in enter_query mode.
    cesar (guest) wrote:
    : Spencer Tabbert (guest) wrote:
    : : I would like to place a button on my form that esential will
    : : allow the user to press this button rather then hitting F7
    and
    : : F8 to query. The problem is that when you got into
    enter_query
    : : mode you can not navigate to another block which then means
    : that
    : : I when i click my button to execute the query I am not able
    : to.
    : : It is not feasible to place the button as the same block i
    want
    : : to query because of the fact that it displays multiple
    records
    : : which means it would display my button 5 times. How can I
    : : achieve this?
    : : Thanks
    : : Spencer Tabbert
    : You should place your button in a control block, maybe in a
    : horizontal toolbar canvas.The button will work for any block
    of
    : your form.
    : If you need an example,you could send me an e-mail.
    null

Maybe you are looking for

  • Re importing files to AE problem

    I followed the help instructions to re-import files to an AE project, but I had one problem. Certain files don't appear in my timeline, they are unviewable, and they have a different name and icon next to them. I'll provide a screen shot to show you

  • Sales order credit block - No credit master data maintain

    Hi , I have a sales order blocked for credit check. But i have not maintain any credit master data for this customer. Customer and payer is same. I want to know why credit check is carried out for this customer and what basis system carry out credit

  • Wrong automatic paper tray selection in HP LaserJet M3035 printer.

    Hello, I have a printer (this one http://h10010.www1.hp.com/wwpc/us/en/sm/WF06b/18972-18972-3328064-12004-3328083-2512333-2512337-3435... ) shared in Active Directory by several users (running Windows XP machines). The thing is that no matter how man

  • Cannot boot from leopard disc anymore(or image of), everything else fine

    I am posting this from the osx forum because this is now obviously a hardware problem. http://discussions.apple.com/thread.jspa?threadID=1524924&tstart=60 In addition I have swapped the ram chips around and tested them one at a time and made an image

  • Does Illustrator CS3 work on Mac OS X Lion?

    I have installed the Adobe CS3 Design Premium (from original package discs) on my iMac but I am unable to open the applications (with an exception of PS) and get "the application has unexpectedly quit" notification. I was able to use all applications