KEY-CLRFRM Trigger at Block Level

Hi
Version - Forms Builder (9.0.4.2.0)
What's the use of KEY-CLRFRM @ block level?
I have requirement where I need to clear all the blocks except one block in the form when press F8 (clear_form). Is this possible.
rgds
shabar

Hello,
You could create a form-level KEY-CLRBLK trigger, then test what block raised the trigger (:SYSTEM.TRIGGER_BLOCK) in a If ... Endif structure.
Francois

Similar Messages

  • Form level Trigger Vs Block Level trigger

    I have a form with single Database Block. I need to write a
    transaction Trigger for this Block. I need to know r there any
    advantages of writing the triggers at Form Level rather than at
    Block Level.
    Thanx in advance
    --- Moneesh Walia
    null

    Hello,
    If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
    Francois

  • Use of KEY-OTHERS trigger

    Hi,
    I have a form that has numerous triggers defined at the form level. The form has a block that appears in a dialog window. The block should only have a small subset of triggers that are defined at the form level. I went ahead and created the key triggers necessary at the block level; I also defined a key-others trigger defined as null on the block to disable all other key triggers defined at the form level???. However it's not working, key triggers at the form level are still firing. Is the key-others trigger suppose to suppress triggers at a lower level or do I have to specifically deactivate all the key triggers at the block level?
    Thanks for you help in advance

    Key-Others at the block level will only override a form-level Key-Others. It will not override any other form-level triggers.
    You must either override all the form-level triggers at the block level, or add code to the beginning of each form-level trigger such as:
    If :System.trigger_block = 'MY_SPECIAL_BLOCK' then
      Return;  -- exit if in the special block
    End if;

  • KEY-EXEQRY trigger and FROM CLAUSE QUERY problem

    Hi,
    I have a form designed in Oracle Forms6i. I have two block on it, BlockA and BlockB.
    When BlockA is queried with some data to search, I need to build the FROM CLAUSE QUERY for BlockB. It uses the same WHERE condition as I used to search BlockA.
    I am building the FROM CLAUSE QUERY and executing query for BlockB on KEY-EXEQRY trigger of BlockA.
    It works fine, if first time, I query the BlockA without any specific data. But it gives me error 'ORA-01008: not all variables bound' if I query the BlockA with specific data very first time.
    Please advise.
    Thanx
    Zaaf

    No, I am not using any substitution variables. To get the LAST_QUERY for BlockA, I am using Get_Block_Property.
    But now I switched it to :system.LAST_QUERY and it worked.
    Thank you!

  • Force Form to Execute builtin trigger at form level

    Hi,
    I have form 10g R2 I put PRE-UPDATE trigger at block level and Form level but I when I update a record it executes only block level update trigger, I want to execute both builtin at block as well as form level, is there a way.
    Thanks and Regards, Khawar.
    Message was edited by:
    S. Khawar

    I created a test form (Oracle Forms 10g r1) that hits the EMP table in the SCOTT schema. In the form, I added a Pre-Update trigger at the Form and Block level. With the "Execution Hierarchy" (EH) left at the default Override, saving my form caused only the Block Pre-Update trigger to fire. Changing the Block EH to Before and the Form EH to After caused the Block Pre-Update to fire first followed by the Form Pre-Update. I then changed the Form EH to Before and the Block EH to After and tried it again. This time, the Save caused the Form Pre-Update to fire first and the Block Pre-Update to fire second. Therefore, S.Khawar, depending on which Pre-Update trigger you want to fire first, I suggest you set the Execution Hierarchy accordingly.
    That was an fun little exercise. I've had this discussion with people before, but never took the time to throw together a test case to confirm what really happens in a Form. Steve - thanks for raising the question! :-)
    Craig...

  • Strange behaviour on KEY-COMMIT trigger

    Hallo!
    I'm developing a form on Forms Builder [32 Bit] Version 10.1.2.0.2 and I have the following problem:
    In some of the fields I need to perform a check whether a user inserts correct content type (CAPS + language). To do this I have put on KEY-NEXT-ITEM and POST-TEXT-ITEM triggers on the fields an appropriate function to be executed that gives a suitable message to the user.
    On form level I have a KEY-COMMIT trigger that performs some actions besides commit as well.
    The problem is that if I enter wrong content on the relevant fields and right after I give SAVE (standard menu or toolbar way) I get the message displayed many times (more than the wrong fields) and no commit.
    Any ideas what should I do to eliminate this?
    Many thanks,
    Alexandra

    Thank you very much for the suggestions to use WHEN-VALIDATE-ITEM trigger. It works fine.
    My problem was caused by the code in KEY-COMMIT trigger on form level (following COMMIT;):
    CLEAR_FORM(no_validate);
    do_key('enter_query');
    These 2 lines caused the excessive validation producing multiple messages.
    I replaced with:
    If NOT form_success then
         RAISE Form_Trigger_Failure;
         else
         CLEAR_FORM;
         do_key('enter_query');
    End if;

  • Block level trigger vs form level trigger

    Hello.
    I want to know what is better - to use block or form trigger?
    I have many blocks in my form. I need to write custom code in (for example) key-crerec trigger.
    Should i put trigger into each block or should i create one at form level like:
    if :system.current_block = 'BLOCK1' then
    create_record;
    elsif...
    end if;
    Thanks.
    Message was edited by:
    DejanH

    Hello,
    If you have to handle this stuff in more than one block, it seems more generic to put the code in a form-level trigger if you don't want to duplicate it several times.
    Francois

  • When validate trigger block level

    Hi,
    I Have a form application. On the entrance page If a user forget to enter his name or Password the form prompt the message to aware him about what is missing.
    SO I wrote the folloing code on when validate trigger block level, but it did not work according to my needs, should I replace this trigger with other?
    Sharbat
    BEGIN
         if:Block1.User is null then
         message('Please enter the user name);
         raise form_trigger_failure;
         if:Block1.password is null then
         message('Please enter the password'););
              raise form_trigger_failure;
              end if;
    end if;
    end;

    use
    if:Block1.User is null then
    message('Please enter the user name);
    raise form_trigger_failure;
    end if;
    on key-next-item of user textbox
    and
    if:Block1.password is null then
    message('Please enter the password'););
    raise form_trigger_failure;
    end if;
    on the key-next-item of the password text box

  • How can we disable Block Level Trigge using Form Personalization

    Hi,
    I want to disable block level trigger(WHEN-NEW-RECORD-INSTANCE) using forms personalization at responsibility level.
    Can any one please give me the answer.
    it's urgent
    Thanks and Regards,
    Dhana

    No, Firefox is user choice rules over the "wants" of individual websites as far as disabling contextual menus and the keyboard commands.
    Placing a transparent image over the image will keep the less technical user from saving the main image. If they do try to save it all they'll get is the transparent image overlay.

  • Failure of Key-NxtBlk Trigger in Tab Pages

    Say, I have 3 blocks, b1, b2 and b3, wherein block b1 and b3 are in a "tab-paged canvas" and block b2 is in a different canvas.
    When the control is in the tab-canvas (say in block b1). Upon pressing the Key_NxtBlk, CTRL goes to the third block rather than block b2 (since b1 and b3 are in the same tab page).
    Also, as the navigation is not as per the block sequence, the Key-Nxtblk trigger is also not firing.
    What should I do to make the procedures written within Key-NxtBlk to fire from the tab-canvas and at the same time, make the system navigate as per block sequence.
    Anticipating an Early Solution
    Thanking you in advance
    Ramnath Balasubramanian

    Dear Bogdan Dincescu,
    I cannot set the block navigation style as "Next Block" as every block in within my tab canvas are multi-record blocks with the navigation style as "Change Record". Can you suggest a different solution.
    Regards
    Ramnath Balasubramanian
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Bogdan Dincescu ([email protected]):
    What if you set the block navigation style "Next block"? Then, normally, when pressing TAB/ENTER on the last item of the block, the cursor would move to the next block.
    Then, a key-nxt-blk trigger, set at block level, should help.<HR></BLOCKQUOTE>
    null

  • Key help trigger not displaying help file

    We're using designer 2.0.24.2.0 with headstart 5.0.2, I've created a number of help files for different modules, when you run one of the forms and press the help key, the help file is displayed. If you do it a second time, the help file is not displayed, if you use the ? off the toolbar the help file is displayed.
    I've had a quick look at the core library and there is a package body QMS$HELP which was modified on, with the comments :-
    05-10-1998 S. Davelaar chk_help_mode, invoke_context_help,
    context_help_invoked
    Added boolean to keep track of context help invocation. This to prevent, online
    help is invoked three times in a row: by item-level, block-level and form-level
    trigger (trigger execution style is BEFORE!!).
    I've checked the key-help triggers at Item, Block and Form level, they are all set execution style before and these triggers are firing each time the help key is pressed.
    Is this a known bug which has been fixed in a later release? Or does anyone know of a quick fix?

    This was identified as bug #850317 and was resolved in Headstart 5.0.3.2.

  • Query on KEY-PRVBLK trigger

    Hi All,
    I have a KEY-PRVBLK trigger which has certain validation which calls various procedures and functions in it. From business point of view they want previous block validation to execute however they doesnt not want previous block trigger to move to the previous block. Hope i am clear with my business requirement.
    I want to write a functionality on the same KEY-PRVBLK trigger (after all the validations happens for the user), the KEY-PRVBLK trigger should be de-functional when the user tries to move to the previous block. Anyways of writing this logic?
    In general the user should not move from the current block to the previous block without affecting the logic... Can anyone please provide your expertise...
    Regards,
    Mark

    In KEY-PRVBLK trigger, either GO_BLOCK or PREVIOUS_BLOCK is present... :(
    They have handled this PREVIOUS_BLOCK in a procedure that too like the following....
    IF p_key_name = 'KEY-PRVBLK' then
    l_proc_name = 'PREVIOUS_BLOCK';
    In other instances they have used the GO_BLOCK in two different form level triggers:
    KEY-NXTKEY : GO_BLOCK('WR');
    LOCAL_STARTUP : GO_BLOCK('WR');
    I dont know which trigger needs to be commented and without any abnormal effect... :(

  • A simple question about KEY-CREREC trigger

    Hello friends at www.oracle.com ,
    let's suppose you create a KEY-CREREC trigger with a simple CREATE_RECORD instruction; this trigger is located at form level (that is, is not located at any block).
    If this KEY-CREREC trigger is located at form level, once fired, should Forms create the record for all blocks below the form, or should Forms only create the record at the block you are located?
    Sorry, I know it's simple, but it has caused a problem here and I need to understand it.
    Hope I was clear - if not, please feel free to ask me.
    Thanks, and best regards,
    Franklin Goncalves Jr.

    The trigger will just create a record in the block you are in.
    If you want to create a record in all the blocks you need to code the trigger to loop over the blocks in the form and issue a create_record in each one.
    The form level trigger is used to define behavior that you would like to have in all your Forms. You can then override this behavior by having a block level trigger with the same name.

  • How to make 'Key-Enter' trigger (when clicked on enter key)work like 'F8' key?

    Hi . I have another question to be asked.
    Oracle Forms 6i.
    I have a form in which DEFAULT&SMARTBAR is the menu and there are no push buttons.
    In the form, there is a 'field' named as 'ID No'. After entering 'ID No' in the field and click on 'Execute Query' button from the 'DEFAULT&SMARTBAR' menu, all the details of that respective 'ID No' gets displayed in all the other fields. Even if i press 'F8' all the fields gets displayed with the values.
    But i have a requirement, i.e. after entering 'ID No' and click 'Enter' key , i want all the values to be displayed.
    So i created a 'Key-Enter' trigger with the following code:
    BEGIN
      EXECUTE_QUERY;
    END;
    But after entering 'ID No' and click 'Enter' key, the values are not getting displayed.
    What can i do to make this happen?
    Thank You.

    It depends how your form is created. If your ID item is part of the base table block, you can do this.
    On your ID item, create a KEY-NEXT-ITEM trigger:
    if :system.mode = 'ENTER-QUERY' then
        execute_query;
    else
        next_item;
    end if;
    Now
    - User clicks on enter query (via smart bar icon or F7).
    - User enters ID and clicks <enter> key to execute the query.

  • When-validate-item firing on block level.

    Hi all
    i have six fields and when-validate-item trigger is working on block level, i want to display records in one field,i want when-validate-item trigger work on item level not on block level,any help will be greatly appreciated.
    here is the code.
    When-Validate-Item Trigger.
    declare
         Str_Space VARCHAR2(20);
    begin
    Str_Space := ' ';
    :ins1.ref := :ins1.branch || Str_Space || :ins1.class || Str_Space || :ins1.year || Str_Space || :ins1.serial || Str_Space || :ins1.cno || Str_Space || :ins1.edno;
    end;
    sarah

    Francois Degrelle.
    just look the following code.
    DECLARE
         Str_Space VARCHAR2(20);
    begin
         Str_Space := ' ';
    :ins1.ref := :ins1.branch || Str_Space || :ins1.class || Str_Space || :ins1.year || Str_Space || :ins1.serial || Str_Space || :ins1.cno || Str_Space || :ins1.edno;
    END;
    by using the above code i am passing branch,class,year,serial,cno and edno to Ref column( 1 G01 2009 13112 00 01). and Str_space variable is creating space for each item.i want the above code work at item leavel instead of block level.Is it poassibl?
    sarah

Maybe you are looking for

  • How do I change icons to text in the Control Panel?

    Hello, I'm trying to follow along with a video at Lynda.com on AI CS6. However, in the video, Deke McClelland is showing the TEXT "Align" on the top Control Panel. On my screen, it's not a text, but a small icon. When I click it, I don't get the same

  • Error when connecting to MDM from different lan

    Hi, I got "Image Server Login Error" when connecting with client to server from different LAN, server is up, and i can connect to it when i in the same LAN. Ports 20003, 20004, 20005 for MDM server discovering and repository port 2345 is accessible t

  • Every time I attempt to render video Premiere crashes

    I'm working on a pretty big project (for me at least) but when I was going to render a sample to send for feedback premiere simply refused and crashed. It kept doing this every time I attempted to render an output file including ANY of the video trac

  • Videos Imported from iPhoto Cannot Play in Photos

    Hello, I just upgraded to Photos and accepted the default setting to convert my iPhoto library to Photos/iCloud format.  All went fine without errors and I see that Photos created an entire duplicate on the iPhoto library. The problem is I cannot pla

  • Tethering STILL doesn't work with the 5D3

    I just upgraded to LR 4.2... It DOES see the camera, the camera settings and even triggers the camera. However, the image files are nowhere to be found. Sigh.