Buttons in a control block

Greetings,
I have a simple question. Do buttons in a control block automatically act on other blocks within a form or do they need to be told what block to act on.
I have a template form that consists of a control block with a couple buttons such as save, clear and exit. My scheme is to bring in the template and introduce other blocks that write to and query the database. The buttons are not necessarily doing what they are supposed to.
Bradley

Hi Bradley,
As per my understanding you need a toolbar of buttons performing generic actions (e.g COMMIT, CLEAR_RECORD)on all the blocks in a form.
Ensure that the Mouse Navigate property of all the buttons is set to No. Otherwise, the associated code ( I am assuming all code is in WHEN-BUTTON-PRESSED)will be performed on the block the button belongs to.
Monica

Similar Messages

  • Execute query in control block?

    I have a non database block which is the control block. In this block i have a button for query/ enter query. My other blocks are all based on a database table. So when i run the form and press the exec query button, on the control block, i want to be able to select something from an lov, or a drop down or even a text item which are located on any of the other blocks. and then hit the exec query button again to query the specific information.
    But its not working. i can't seem to get the exec query button to work in the control block and i tried placing it on one of the blocks but i can only select from that block to query on and not any of the other blocks.
    how can i get the exec query button to work on any of the other blocks depending on what i want to query up?

    You will have to build a default where clause in the pre query trigger of the base table block(s)
    example shown below.
    declare
    wh_clause varchar2(1500);
    begin
    if :qry_blk.item1 is not null then
         wh_clause := 'block.item1 like '''||:qry_blk.item1||'%'||'''';
    end if;
    set_block_property('block', DEFAULT_WHERE, wh_clause);
    end;
    then in your button, you will say
    go_block('block');
    execute_query;          
    I have a non database block which is the control block. In this block i have a button for query/ enter query. My other blocks are all based on a database table. So when i run the form and press the exec query button, on the control block, i want to be able to select something from an lov, or a drop down or even a text item which are located on any of the other blocks. and then hit the exec query button again to query the specific information.
    But its not working. i can't seem to get the exec query button to work in the control block and i tried placing it on one of the blocks but i can only select from that block to query on and not any of the other blocks.
    how can i get the exec query button to work on any of the other blocks depending on what i want to query up?

  • Control Block

    Hi all,
    I have a control block with one item and a push button.
    and i have another block that one is a base table block. i need to display records in the base table block using the control item and a push button. What coding i should write for this.
    Thanks

    Hello,
    Please be more specific on what you want to accomplish. For example, do you want your users to display the records in the base block when they click on the button in the control block (in this case, attach a when-button-pressed to the button and use the built-in execute_query for example).
    Second, what is the use of the item you have in the control block. Do you use it to hold a value that is going to be used in a WHERE condition for example ?

  • Sorting the data of control block in oracle form 10g

    I have two block....both are the control block..
    in first block i select the date and in second block the data of that date is populated.but the data is populated
    using cursor in when-button-pressed trigger of that first block button...
    in cursor the data is selected and placed in field of detail block using into clause.... each field..
    .and one item of detail block is srno which is create in post-query of detail block using
    :sysyem.trigger_record.
    Now i want after populated the detail block the data is sorted desc one of the field of the detail block...
    Can this possible using set_block_property() of block although the block is control block if yes where i should do
    this??????
    Please explian...????

    but with the cursor of repopulate ...how the block is in desc by one field..because if i use again the same cursor to poulate than whats this benefits???
    if i write a cursor in button when-button-trigger in first block like this code....
    go_block('');
    cursor emp_cur is
    select empno,date,sal
    from emp;
    begin
    for i in cur loop
    select i.empno,i.date,i.sal
    into :empno,:date,:sal
    from emp
    end loop
    end;
    this loop populate the block which is controll block..
    syntax error should be ignored ...i wana to explain what i want to do...
    this is not the actual query i have another query but the concept is that...
    how i can do this...

  • Using a control item in the control block

    I want to do; using a control item in the control block, I can control the item in the detail block and I can navigate anywhere in the detail block on the condition.
    For example, I have a master block ,a detail block,a control block.
    before move the focus from the mater block to the detail block, the focus goes to the item in the control block and run a trigger and set properties for the items in the detail block, then navigate to the item in the detail block using go_item(?).
    Is it possible? if possible would you give me some example or idea?
    thanks a lot.

    well u can.May be you want to perform add / delete/ update through your buttons in forms

  • When radio button is enabled the block should be enable

    I have a 4 radio buttons and a four blocks in a same single canvas , and when ever i enable a radio button the related block should get enable .. pls help me with coidng

    Use the when-radio-changed trigger. There is a RADIO BUTTON VALUE property per radio item. You can place in the trigger...
    IF CONTROL.TEMP_RADIO_BUTTON = 1 THEN
    SET_BLOCK_PROPERTY ('BLOCK1', ENABLED, PROPERTY_TRUE);
    ELSIF...
    END IF;
    Hope this helps...

  • [Forms 10] How to activate all buttons in a details block?

    Hi,
    I have a details block based on products. (10 lines)
    I have a block_buttons with a button on the same canvas.
    I set the block_buttons number of records to 10 so that the buttons and the records are aligned.
    [prodno] [button] <-- active
    [prodno] [button] <-- disabled
    [prodno] [button] <-- disabled
    [prodno] [button] <-- disabled
    [prodno] [button] <-- disabled
    At the moment only the first button is active.
    The 9 buttons under it are disabled.
    I can't find if I have to set a property or to write code to enable the 9 buttons under the first one.
    Thanks for your help.

    Hi,
    I have managed to get the buttons list to be actve.
    I have created a testbuttons table with a chkbx column.
    I added a checkbox list to the block.
    The button can't be a database item, but the checkbox can.
    Then if I execute_query on that block all items are activated.
    Now I'll try creating a PLSql table on the client side and try using it as support for the control block.

  • Form with a control block

    I have a form with no database block. there is only one control block with a button
    when a user presses the button I insert record into a table and then commit;
    I am getting no changes to save message. how can I avoid that.
    (setting record-status to query?) any other way?

    Change your design of logic. In the case insert and commit in procedure on the server side.
    Try to play with :system.message_level.
    Well, consider using the FORMS_DDL command, of course.

  • INSERT within a CONTROL Block.

    I have created a control block, one not based upon a table or procedure, and that block has a single item which is a BUTTON. The Button item has a WHEN_BUTTON_PRESSED trigger that contains the DML insert into table mytable values(myvalues); and a COMMIT; statement. When the button is pressed, the row is inserted, however, the message FRM-40401: No changes to save. is displayed. If I leave off the COMMIT statement, the row is not commited. How do I avoid this message?

    The message you get is ONLY a message, so try this:
    DECLARE
    oldmsg CHAR(2); /* Old Message Level Setting */
    BEGIN
    oldmsg := :System.Message_Level;
    :System.Message_Level := '5';
    commit;
    :System.Message_Level := oldmsg;
    END;

  • Change to display field on control block not reflected until form refreshed

    Hi guys, hope someone out there can help me with this query.
    I'm currently developing a form that will allow users to generate offer letters and contracts via a custom form which is used within Apps 11i. This form is a fairly standard multi-text field form with tickboxes which hold the applicant details, two buttons (one to Select All, the other to Clear All) and another button to produce the actual contracts selected.
    There is also a display field which is part of the control block attached to the form; both it and the Produce Contracts button are part of this control block. I've added a bit of code to change the text in the display field to inform the user that the contract or contracts they've requested are being generated, but although the call to the relevant code to do this appears before kicking off the concurrent request to generate the contracts, the update to the field fails to appear until after the concurrent request is complete and its output appears on another screen.
    Does anyone know why this is? I've racked my brains over it and can't seem to understand why. I've pasted the code in below if anyone has any ideas!
    Many thanks, Geoff
    --- procedure display_status_message ---
    --- Displays a status message in the request_extract_ctrl.query_information ---
    --- display item informing user what is going on ---
    --- Changes: ---
    --- G Butler 21/08/08 First version ---
    procedure display_status_message(p_tab_count in binary_integer default 0) as
    c_proc_name constant varchar2(50) := 'display_status_message';
    v_position pls_integer;
    v_msg_string varchar2(500);
    v_status_msg varchar2(2000);
    begin
         v_position := 1;
         --- go to the request_extract_ctrl block
         go_block('REQUEST_EXTRACT_CTRL');
         --- check how many records have been sent for generation
         --- get the correct message from the message dictionary
         if p_tab_count = 1 then
         fnd_message.set_name('XXJSDATA','SSL_CA_LETTER_CONTRACT_SUBMIT');
         elsif p_tab_count > 1 then
              fnd_message.set_name('XXJSDATA','SSL_CA_LETTER_CONTRACTS_SUBMIT');
         end if;
         v_position := 2;
         --- copy the message into the display item field
         v_status_msg := fnd_message.get;
         :request_extract_ctrl.query_information := v_status_msg;
         -- synchronize the change in the display item field with the form on screen
         synchronize;
         v_position := 99;
    exception
         when others then
    v_msg_string :='Unexpected error occurred in display_status_message procedure, position: '||v_position;
    v_msg_string := v_msg_string||'. SQL error: '||sqlerrm;
    fnd_message.set_string(v_msg_string);
         fnd_message.error;
         raise form_trigger_failure;
    end display_status_message;

    I had a similar problem, but it was with the message line. I found that with Web Forms, I had to issue the Synchronize; a second time, but in Client/Server Forms 6i, the first synchronize worked. Here is the code I used:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy"> SYNCHRONIZE;
    if Get_Application_Property(User_Interface) = 'WEB' then
    synchronize;--first does not work on web
    end if;</font></pre>
    Let us know if this works.

  • Is it possible to update (=change) control block items in a query only form ?

    From Form.A we call Form.B with the parameter query_mode = query_only.
    This works fine.
    But in Form.B we have a non table block (=control block) with an poplist item.
    Allthough in query_only mode we like to change (it's not a real update cause it's control block) the poplist.
    But because of query_only mode this item is not updateable.
    Is there a workaround to make the poplist updateable in query_only mode ?

    Hi,
    It is not possible to change the BOX position using the Layout painter like changing windows position.
    You have change in the page Windows text elements only by changing their co ordinates.
    Regards,
    Anji

  • Inserting/updating data in control block based on view

    Hi!
    I`ve created a block based on a view to display data.
    I want this block to be insertable and updateable, that is I will use a on-insert/update trigger to call an insert/update procedure located in the database.
    When trying to change/insert a value in the block, the error message "Error: Can not insert into or update data in a view" pops up. I`ve tried to get rid of this error, without success.
    How can I make a data block based on a view insertable and updateable?
    My guess is that this have something to do with locking the records(there is no rowid in the view)... but I'm not sure.
    Pls advise!!

    Morten
    As well as on-update, on-insert, on-delete triggers you also need an on-lock,
    (even though it might just contain null;) otherwise the form will try to lock the view and fail.
    Actually your terminology is wrong, the block being based on a table or view is not a control block. A control block is not based on anything and has no default functionality for communicating with the database. If it was a control block, the on- triggers would not fire.

  • Control Block - Preventing creation of new record

    hi,
    i have a control block with two text fields. i do not want new record created for this block when the down key is pressed.
    How do i do that ?

    Re: data disappears when pressing down arrow key

  • How to clear a record of control block

    i have one control block with 2 items and the Max. records displayed property is set to 10.I have populated 5 records and now i want to clear one record, but the clear_record statement does not seem to be working. How to clear a record in a control block. Please help me out in this doubt of mine.

    You have probably moved focus to another block. You have to go_block and maybe go_record before using clear_block.

  • Data block or control block

    any one please suggest : which is faster and better in 9i forms/reports applications, a data block with form triggers(pre,post,commit_form) for DML ; or a control block with explicit DML for retreiving and posting from/to data base.
    can PJC help in boosting performance. How ?

    Thanks but a.I find the busy dumble for a while before allowing the user to type the content in a database item (at a w/s in LAN about 900 meters away from AS). Posibly validating the item all the way to the database and back.
    b. I found certain form triggers failing e.g. pre/post update resulting erroneous enterprise data.

Maybe you are looking for