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

Similar Messages

  • 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

  • [Solved] Problem with LOV and 'enter query' mode

    Hi all,
    I'm kind of new to Forms and I'm having some problems that I'm not being able to resolve. I already search it on the net, but nothing relevant came up. If anyone could help me I appreciated it.
    In my form I have some fields, and in one of them I have a LOV, and almost everything works fine. I inserted data, changed it, deleted it and all it's ok.
    But when I change to 'enter query' mode, when I try to search for data on the LOV field it ignores what I write.
    That is, for it, it's the same if I make F11 -> write 'aaaa' -> ctrl + F11 or if I make F11 -> '%' -> ctrl + F11.
    It behaves the same way, shows me all the records.
    Probably I'm missing something basic, but I'm not getting it...
    Thanks,
    Ana

    when you create a lov by wizard the lov and record group have always the same name..
    the problem is that the item is NOT based in the tabe.
    what kind of query do you execute if you choose something from a love which is not based on the db?
    i mean, this item has no influence on the query of the table, so whatever you choose it's like a "select * from table"
    i hope i was clear

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

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

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

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

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

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

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

  • Changing visual attribute in Enter Query mode

    Hello, I want to change visual attribute of all items in the first record when the user presses button for Enter_Query. I want that the user sees that the form is in enter query mode and it "waits" for the input of criteria. My code (copied from Help and modified) in trigger WHEN_BUTTON_PRESSED:
    DECLARE
    cur_itm VARCHAR2(80);
    cur_block VARCHAR2(80);
    BEGIN
    ENTER_QUERY;
    cur_block := :System.Cursor_Block;
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'yellow');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;
    where yellow is the name of my visual attribute.
    The problem is that I need to press the button TWICE to color the record.
    Can anybody help me with this problem?
    Natasa

    (Wrong forum).
    The problem is that enter_query stops executing your procedure until
    another action ist started by the user.
    You must create a short-time timer before issuing enter_query and set
    your colour scheme in the when-timer-expired-trigger.

  • 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

  • [ Forms10g2 ] Default item value in Enter-Query mode

    Hello!
    How could I specify default value for an item in Enter-Query mode? E.g. I press KEY-ENTQRY, and :L_YEAR item gots current year as a default search condition (though it may change). I've tried to implement it this way:
    <pre>
    Enter-Query;
    :l_year := extract(year from sysdate);
    </pre>
    This work in a rather awkward way. If I run this once (e.g. as a result of a hotkey press), it just enters Enter-Query mode, but if I run this twice (by pressing hotkey second time) it fills :year variable and does search with it as a search condition! Then, I've tried to go straight and wrote:
    <pre>
    Enter-Query;
    :l_year := extract(year from sysdate);
    Enter-Query;
    :l_year := extract(year from sysdate);
    </pre>
    Well, this didn't work. And SYNCRONIZE call before the second Enter-Query didn't help either. So, my questions are: 1) how can I achieve needed behaviour? 2) What's going on in my experiments? Why :L_YEAR gets assigned on second keypress (as in first experiment) but not on second subsequent call (as in second experiment)?
    Thanks in advance!

    I don't know why that won't work but I have something which might:
    when-new-record-instance trigger:
    if :system.mode = 'ENTER-QUERY' then
      :l_year := extract(year from sysdate);
    end if;It's always best to use both the block and item names...:block.l_year

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

  • Do_Key in Enter-Query mode

    Hello,
    I have a WHEN-BUTTON-PRESSED trigger that has do_key('list_values') that brings a calendar. I use calendar.pll library. It works, when the system is in normal mode. But when the system is in enter-query mode it does not work. It says "Function key not allowed". What is the alternate solution, other than calling the calendar functionality from a new form?
    Thanks in advance.
    Arun.

    try this out,
    go_item('item_name');
    execute_trigger('key-listval');
    specify the item name for go_item

Maybe you are looking for