Set_item_property after enter_query.

Hello,
How can i update properties of items after the enter_query command.
When i try :
set_item_property(......)
enter_query;
it doesn't work, because the enter_query makes a clear_block which set all the properties to default.
when i try :
enter_query;
set_item_property(.....)
it doesn't work, the programs stops after the enter_query command and the set_item_property is not done....
thanks.

Hi there,
After you set the visible property, you need to set 2 other properties:
set_item_property('<block>.<item>', enable, property_true);
set_item_property('<block>.<item>', navigable, property_true);
Hope this helps!

Similar Messages

  • Execute_query after enter_query

    i want to filter the results obtained on execute_query
    for that i wrote a trigger on a button:
    When-button-pressed
    enter_query();
    :ename:='WARD';
    execute_query();
    but i am stuck at enter query mode and not proceeding
    there is one one data block emp
    i am using forms 6i
    Edited by: 875107 on Jul 26, 2011 5:16 AM
    Edited by: 875107 on Jul 26, 2011 5:16 AM

    Hi,
    The ONETIME_WHERE is the keyword using in 10g. In 6i, you have to use DEFAULT_WHERE. So change the line to
    set_block_property('<block_name>', DEFAULT_WHERE, 'ENAME = ''WARD''');And if the WARD is from an item in a block, then write
    set_block_property('<block_name>', DEFAULT_WHERE, 'ENAME = ''' || :<block_name>.<item_name> || '''');Hope this helps,
    Regards,
    Manu.
    Edited by: Manu. on Jul 26, 2011 3:59 PM

  • Problem with webutil library in Forms 11g debug (FRM-93652)

    Hi.
    I have a problem when debug a forms in OFM11g, that used.
    the problem is that the forms, in debug mode, raise the error FRM-93652. Only in debug mode.
    I add tha jacob.jar and jacob.dll in the folder ORACLE_HOME/forms/java and Oracle_home/forms/webutil.
    the classpath variable in default.env, has added the jacob.jar file, and in my FORMS_BUILDER_CLASSSPATH Registry variable.
    Can some one help me???.
    Thanks and sorry for my english

    I have the same issue with debug_messages in Forms 11g -- they will not appear. I can, however, run in debug mode and attach the session to Forms Builder 10.1.2.0.2. Thus, when I run in debug mode and check the the Command Line tab under Global/System Variables, DEBUG_MESSAGES is always set to NO regardless of how I set it on the command line. Still works fine in our 10gR2 instances.
    DB 11.1.0.7
    Forms 11.1.1.4
    WebLogic 10.3.4
    AIX 5.3 64-bit
    AIX Java 1.6.0 SR9 FP1
    Client: WinXP JRE 1.6.0_25
    My real issue has to do with a FRM-40734 on EXIT_FORM after ENTER_QUERY or EXECUTE_QUERY have caused the KEY-EXEQRY trigger to erroneously fire -- especially when DO_KEY is involved -- but that's a different and much more problematic story.

  • 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

  • Form hangs some time frequently??

    hello expert,
    in my erp system some time a form hangs very frequantly.
    what could be the reason???
    form is used for new BOM or to modify BOM.
    there is two buttons
    Add and Mofidy.
    when i click on Add button, its hangs some time very frequently but modify works same time while add button hang the form. this problem come some days.
    Add button code is below:
    DECLARE
    form_name VARCHAR2(100):=:System.Current_Form;
    cntrl_block VARCHAR2(100):=GET_FORM_PROPERTY(form_name ,FIRSTBLOCK);
    first_block VARCHAR2(100):=GET_BLOCK_PROPERTY(cntrl_block,NEXTBLOCK);
    last_block VARCHAR2(100):=GET_FORM_PROPERTY(form_name ,LASTBLOCK);
    temp_block VARCHAR2(100):=first_block;
    BEGIN
    delete from str_item_temp;
    IF :GLOBAL.navigation = 'D' AND :GLOBAL.mode = 'X'
    THEN
    set_item_property(cntrl_block||'.SAVE' ,ENABLED,PROPERTY_TRUE);
    set_item_property(cntrl_block||'.CLEAR' ,ENABLED,PROPERTY_TRUE);
    set_item_property(cntrl_block||'.MODIFY' ,ENABLED,PROPERTY_FALSE);
    set_item_property(cntrl_block||'.ENTER_QUERY' ,ENABLED,PROPERTY_FALSE);
    set_item_property(cntrl_block||'.EXECUTE_QUERY',ENABLED,PROPERTY_FALSE);
    :GLOBAL.mode := 'A';
    :STATUS_DISPLAY := 'ADD MODE';
    LOOP
         Set_Block_Property(temp_block,INSERT_ALLOWED,PROPERTY_TRUE);
         EXIT WHEN temp_block=last_block;
         temp_block:=GET_BLOCK_PROPERTY(temp_block,NEXTBLOCK);
    END LOOP;     
    GO_BLOCK(first_block);
    CLEAR_BLOCK(NO_VALIDATE);
    ELSIF :GLOBAL.navigation = 'D' AND :GLOBAL.mode != 'X'
    THEN
    mess('Press Clear Button First');
    GO_BLOCK(cntrl_block);
    ELSE
    mess('Mode is not applicable');
    GO_BLOCK(cntrl_block);
    END IF;
    END;
    modify button code is below:
    DECLARE
    form_name VARCHAR2(100):=:System.Current_Form;
    cntrl_block VARCHAR2(100):=GET_FORM_PROPERTY(form_name ,FIRSTBLOCK);
    first_block VARCHAR2(100):=GET_BLOCK_PROPERTY(cntrl_block,NEXTBLOCK);
    last_block VARCHAR2(100):=GET_FORM_PROPERTY(form_name ,LASTBLOCK);
    temp_block VARCHAR2(100):=first_block;
         first VARCHAR2(100):=first_block||'.'||GET_BLOCK_PROPERTY(first_block,FIRST_ITEM);
    last VARCHAR2(100):=first_block||'.'||GET_BLOCK_PROPERTY(first_block,LAST_ITEM);
         temp VARCHAR2(100):=first;
    BEGIN
    IF :GLOBAL.navigation = 'D' AND :GLOBAL.mode = 'X'
    THEN
    set_item_property(cntrl_block||'.SAVE' ,ENABLED,PROPERTY_TRUE);
    set_item_property(cntrl_block||'.CLEAR' ,ENABLED,PROPERTY_TRUE);
    set_item_property(cntrl_block||'.ENTER_QUERY' ,ENABLED,PROPERTY_FALSE);
    set_item_property(cntrl_block||'.EXECUTE_QUERY',ENABLED,PROPERTY_FALSE);
    set_item_property(cntrl_block||'.ADD' ,ENABLED,PROPERTY_FALSE);
    :GLOBAL.mode := 'M';
    :STATUS_DISPLAY := 'MODIFY MODE';
    LOOP
         IF Get_Item_Property(temp,ITEM_TYPE) NOT IN ('BUTTON','CHART ITEM','DISPLAY ITEM','IMAGE','VBX CONTROL')
         THEN     
              IF Get_Item_Property(temp,QUERYABLE)='TRUE'
              THEN     
              -- set_item_property(temp,VISUAL_ATTRIBUTE,'MODIFY');
              set_item_property('block.bom_mod_code',VISUAL_ATTRIBUTE,'MODIFY');
              ELSE
                   set_item_property(temp,VISUAL_ATTRIBUTE,'ADD');
              END IF;
              END IF;
    IF temp=last
              THEN
              EXIT;
              ELSE      
                   temp:=first_block||'.'||GET_ITEM_PROPERTY(temp,NEXTITEM);     
              END IF;
    END LOOP;
    LOOP
         IF temp_block=first_block
         THEN     
         Set_Block_Property(temp_block,INSERT_ALLOWED,PROPERTY_TRUE);
         ELSE
              Set_Block_Property(temp_block,INSERT_ALLOWED,PROPERTY_TRUE);
         END IF;     
         Set_Block_Property(temp_block,UPDATE_ALLOWED,PROPERTY_TRUE);
         EXIT WHEN temp_block=last_block;
         temp_block:=GET_BLOCK_PROPERTY(temp_block,NEXTBLOCK);
    END LOOP;     
    GO_BLOCK(first_block);
    CLEAR_BLOCK(NO_VALIDATE);
    ELSIF :GLOBAL.navigation = 'D' AND :GLOBAL.mode != 'X'
    THEN
    mess('Press Clear Button First');
    GO_BLOCK(cntrl_block);
    ELSE
    mess('Mode is not applicable');
    GO_BLOCK(cntrl_block);
    END IF;
    END;
    when we access same form in network , is there any restriction on no of instance of form access in network.?
    Thanks n regards
    Yash

    Hi Yash,
    I've seen this happen recently at a few of my customer sites with 11g (11gR1 and 11gR2), where the forms application will hang intermittently or every time a certain object is used. Once we applied this patch to our customer's environments, the issue went away. The issue had to do with one of the following issues: Using multiple cores with JRE 6 or displaying multiple alerts in an application.
    Take a look at Oracle Bug in MyOracleSupport: 12433970
    There is also an article that goes along with it: 1245895.1
    Hope this helps!
    Thank you,
    Gavin
    http://www.pitss.com

  • Setting a '%' after the enter_query command...

    Hi,
    I have written an "enter_query" command in WHEN-NEW-FORM-INSTANCE....
    After that i want to set a '%' into a block item which is dababase based.....
    How can i do that.....????
    I use Dev10g
    Thanks,
    Simon

    On behalf of using the same standard (code,colors... on template) i don't want to use.....it....????
    Isn't there any other solution...????
    I have tried various solutions(built-in procs) .....
    :<block_name>.<item_name>:='%';
    copy('%','<block_name>.<item_name>');
    in both PRE-QUERY and afterwards the enter-query command(in when-new-form-instance)... but no desired result....- i mean the character '%' is not written in the block item!!!!!
    Thanks....anyway,
    Simon

  • Tab canvas after content canvas impossible?

    I am still having problems with tab canvases that come after content canvases in Designer 6i. I have changed the QMSO$BLOCK.QMS$BLOCK_INFO VISIBLE property to YES and this allowed me to generate the form, but now I have the little QMS$BLOCK_INFO item displaying and worse yet all of my multi-record tab pages only display 1 record. Is there something else that needs to be changed in the object library? Can I even generate forms with 2 or more tab pages after a content canvas in Headstart 6i (patch 13)?

    I recommend a couple of things:
    - Create a copy of cgso$block and call it something like my$block_tab_problem. In cgso$block, set qms$block_info back to VISIBLE false. Set qms$block_info to VISIBLE only in the my$block_tab_problem copy. In designer, for each MCO that is on the base canvas and has child blocks on tabs on the same canvas, set the Template/Library Object property to my$block_tab_problem. In other words, only apply this change where you absolutely must apply it - the master block of this particular layout.
    - Code a pre-form trigger that sets the qms$block_item trigger to VISIBLE false using the set_item_property built-in. Again, you will only have to include this code in the few forms where you have this layout. This will hide the ugly item.
    - This will eliminate the problem with the multi-record blocks because they inherit qms$block_info from cgso$block which has been set back to VISIBLE false.
    Regards,
    Lauri

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

  • Cursor remaining in the current item even after pressing Enter-Query

    We have an application running in 10g.
    We are getting similar problems in three forms of the application.
    In the form there are 2 datablocks which has a master-detail relationship.
    After the data for the first datablock is retreived, when I click on any of the items and give enter-query, the cursor remains in the same item.
    Ideally the cursor should move to the first item in the datablock after entering the enter-query mode. But it is not happening.
    This is working fine in the other forms. When i give enter-query, the cursor is going back to the first item.
    Only in these three forms, it is behaving differently.
    Expecting a quick reply...

    did you check if the items in object navigator have the same order as on canvas?
    in normal case the cursor goes to the first enterable item in block when entering in query mode.
    as workaround you can write your own KEY-ENTQRY trigger:
    ENTER_QUERY;
    GO_ITEM('YOUR_BLOCK.YOUR_ITEM');

  • A good solution to set the actual data record after execute query ..

    Hi,
    in my Form there is a block on a temporary table.
    The user can add query results and wishes to save the last data focus on the last actual record before the execute query to restore this focus after the query.
    Is there a robust and fast solution to save the
    actual data focus - execute_query - restore the saved focus ?
    Thanks
    Friedhold

    Here is a simple solution to try:
    Create a package specification in your form: Package P0 is
      Save_rowid  varchar2(30);
      Found_rec   number;
    End;Create a Key-Entqry trigger on your block: P0.save_rowid := :Myblock.rowid;
    P0.Found_rec := null;
    Enter_Query;Create a Post-Query trigger on the block: If :Myblock.rowid = P0.save_rowid then
      P0.found_rec := :system.trigger_record;
    End if;Create a Key-Exeqry trigger on the block: Execute_Query;
    If P0.found_rec is not null then
      Go_record(P0.found_rec;
    End if;

  • SET_ITEM_PROPERTY - VISIBLE ENABLE / DISABLE

    I'm quite new to Forms. I want to show or hide some items on my form depending of what the user choose in a LOV. I used the SET_ITEM_PROPERTY to enable or disable VISIBLE like this
    SET_ITEM_PROPERTY('SZBAIDE.SZBAIDE_ETAT_DOSSIER_CODE',VISIBLE,PROPERTY_TRUE); -- > to show the item
    OR
    SET_ITEM_PROPERTY('SZBAIDE.SZBAIDE_ETAT_DOSSIER_CODE',VISIBLE,PROPERTY_FALSE); -- >to hide the item
    The problem is when I show the item, it is disabled and grayed out. Does setting VISIBLE to false also modify other properties?

    Right after I posted the question I found the answer in Forms Help.
    When setting VISIBLE to false, it also sets the following properties to false: ENABLED, NAVIGABLE, UPDATE_ALLOWED, UPDATE_NULL and QUERYABLE .

  • 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

  • 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

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

  • 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

Maybe you are looking for

  • Feature Request: Raw-Lite for the F5/F55

    Hi Sony Staff, Here's a feature request that I've been pondering for a long time now. Raw Lite on the F5(5). Is it a possibility? I'm a huge fan of the conventional 3:1 compressed 4K 16-bit Linear Raw from the AXS-R5. It provides a supremely high qua

  • Need fix - itunes 10.6.1.7 info box unstable when entering info

    When box is highlighted for typing, it sudenly stops being highlighted and you can not enter any data - frustrating!

  • PXI first use, unable to configure/boot safe mode or RT

    Hi all, I am new to PXI controllers, i am having a few issues with a PXI controller in my university which i intend to use for my fyp project. So we are using a PXI 1042Q chassis with a PXI 8106 embedded controller. We started this controller for the

  • Acrobat 6.0 Pro PDF Maker & CutePDF

    Hi there, I have Acrobat 6.0 Professional installed on my computer (Windows XP). I recently had CutePDF installed on my system as well. Since this, my Acrobat PDF Maker will not create a PDF (from Excel 2002) as it used to. It freezes up part way thr

  • Paymont form via fpl9 for negative amount

    Hi, our customer wants to generate a payment form also when the account balance of the customer is negative. however, I'm getting an error message that: Creation of payment form not possible, amount is negative Message no. >6397 Thanks, Vered