Populate in control block

In a form i have 3 blocks.
1. block name - ctlblk - Single Record
2. block name - basblk1 - Single Record
3. block name - basblk2 - Multi Record
Blkname - Item
ctlblk - custcd
basblk2 - custcd
I am entering the data based on the custcd. For a single custcd 100 i have 10 Records, for custcd 200 i have 10 Records.
After querying i am navigating in the basblk2 - Multi Record block.
I want to assign the custcd to ctlblk - custcd
How to do that.

you problem is still not clear to me...
you want to change ctlblk.custcd according to block2.custcd or you want to change block2.custcd on basis of ctlblk.custcd...
you can assign it on post-query trigger.
Please clear ur problem...i hope u will not mind.
Regards,
Neeraj

Similar Messages

  • Populate a control Block with records at runtime

    For Example:
    For c1 in (select some_records from t1 where enam = 'SAM')
    loop
    if c1%ROWCOUNT = 1 then
    create_record;
    else
    Next_Record;
    end if;
    :Block.column1 := c1.member_no;
    :Block.column2 := c1.gender;
    :Block.column3 := c1.age;
    end loop;
    in another procedure
    GO_Item ( :Block.column1 );
    But only the last record to be inserted is showing on the block... Can someone please help? This is a control block and is not based on any table. It is also a multi record block

    I have changed the code as follows:
    For c1 in (select some_records from t1 where enam = 'SAM')
    loop
    if c1%ROWCOUNT = 1 then
    create_record;
    else
    Last_Record
    create_record;
    end if;
    :Block.column1 := c1.member_no;
    :Block.column2 := c1.gender;
    :Block.column3 := c1.age;
    end loop;
    But I can only see the last recrod that was poplated in the block, when I navigate to that block.

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

  • Previous record dont show in control block

    Hi
    I have 2 blocks, one is control and other is database so this is working well but when i press F8 then it show records and i move to next record then it show data in both blocks but when i try to back (previous record) then it show data in my database data block not in my control block................
    Any help
    thanks in advance
    REgards,

    Andreas Weiden Reply:
    As i understand you want to populate some items in a non-database-block with additional information to the current record in the database-block.
    The "right" way:
    Do not create a non-database-block for the additional items at all, simply place the additional items in the database-block with property "Database Item"= No. If you want to show only 1 line of data and your database-blcok is tabular, set "No. of records displayed" to "1" for the non-database-items.
    Now put the code to populate the items into the POST-QUERY-trigger of your database-block.
    The "other" way:
    Keep the additional items in the non-database-block where they are, and put your code to populate the items in the WHEN-NEW-RECORD-INSTANCE-trigger of your database-block.

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

  • Parental controls blocks all https websites

    When I enabled parental controls for my 9-year old, I didn't expect her not to be able to use Google, Gmail and just about every single other website that requires logging in. The reason? Those websites are all https websites and parental controls blocks *ALL* https websites.
    With https becoming more and more prevalent on the web, adding an exception is not really an option anymore. I don't want to add an exception for half of the internet. It's gotten so bad that she's encountering a popup several times per minute when just doing a little research for her homework. Web filtering is apparently a whilelist only solution, suitable only for the smallest of children - the ones that you sit next to because they can't type a web address themselves, 5 years or younger.
    The only solution I could find was to turn off web filtering completely and use OpenDNS instead. Does anyone else know of a better solution?

    Hello,
    A alternative application as a option that is very worthy,
    <http://www.netnanny.com/mac>
    Randy Mac
    RMACS, LLC

  • SOS Help!! Control Block is hitting me on my nerves....

    Hello All!
    I have a problem and id any body can solve this then i will be very thankful to her/him.
    Actually, i have four tables.One of them(studentfee) has two primary keys.(Rollono & Date)in this table the rollno is both PK & FK which reference the rollno of student table.Now problem is that i have a control block and two txt items on it. One is for Month and is used to add the date in the studentfee table and other fields will be added by mean of another data block.And that is the problem bcs the form generate the error(may be bcs other primary key is not entered).
    I think that this problem can be solved by Global variable(assigning the values to Golbal variable in the control block form
    and referencing them in the data block form)
    but this is not helping,too.Now i know
    that i am doing something wrong but couldn't grasp that one.Either i am not generating right code for Global variables OR am starting another session that is why the form is unable to get information from the global variable when i use it in the next form.
    Another question is that: Is there any way to build an .exe Or other file of my
    project which can be run and be ported to another machine(with all tables and data).
    Please, send me the answer to my email or to the oracle site and i will be very thankul to you. Bye..
    [email protected]

    Hi,
    In one block you can have items EXPLECITELLY belonging to only one DB table. You mention this table in the property palette of the block.
    If your block has items which belong to other DB table one way (but not the only way) to work around is with POST_QUERY trigger using primarykey_foreignkey (or other) relation to insert in the item the appropriate value. If there are many values we use master-detail relationships and second block.
    Do not forget before exiting the block to insert, update, delete ,etc. the changed value belonging to different tables using the PRE_INSERT, PRE_UPDATE, ... etc. triggers.
    Try to by a book explaining the Forms principles and methods.
    Keep in eye that Forms is a complex, very complex software tool. Before using them successful you have to invest time and efforts to study the basic solution methods.
    Success!
    Joseph Schwertner,
    Prof.Dr. In Computer Science

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

  • I have Problem in fetching data from CONTROL BLOCK

    Sir,
    I am facing problem in fetching data from control block.
    Asif.

    is your control-block a filter-block for the detail-block?
    Do you want to see only the detail-data of the user-id you have displayed in the master?

  • Testcase for error - "Unable to allocate thread control block"

    Hello,
    The down-below code throws the error message:
    db_stat: Unable to allocate thread control block
    BDB: 4.8, OS: Ubuntu 9.10
    Thanks
    #include <stdlib.h>
    #include <sys/ipc.h>
    #include <db.h>
    #define DIRECTORY "/tmp/db"
    int main()
    // open environment
    DB_ENV *handle;
    int status = db_env_create( &handle, 0 );
    status = handle->set_cachesize( handle, 0, 32*1024*1024, 0 );
    status = handle->set_thread_count( handle, 0x100 );
    key_t key = ftok( DIRECTORY, 'M' );
    handle->set_shm_key( handle, key );
    u_int32_t flags = DB_CREATE | DB_INIT_MPOOL | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_LOG | DB_SYSTEM_MEM;
    status = handle->open( handle, DIRECTORY, flags, 0644 );
    if( status != 0 )
    exit( 1 );
    // raise error
    chdir( DIRECTORY );
    for( int i=0; i < 0x1000; ++i )
    system( "db_stat -e | grep process/thread | wc" );
    return 0;
    }

    Hello,
    I am still looking into this, but upon closer examination here is the situation, basically as reported.
    The test calls set_thread_count which sizes the memory. In __env_attach(), (dbenv->thr_max is used to size the region. So you are correct, the higher the value used in set_thread_count, the larger the size of the region will be. Eventually that memory will be depleted, and __env_alloc_size() returns ENOMEM, after multiple calls to system(db_stat). __env_alloc_free() is not called. This is the part I am still investigating.
    The test uses system to fork a separate processes for db_stat and the failing stack is:
    lt-db_stat: assert failure: ../dist/../env/env_failchk.c/426: "ret == 0"
    lt-db_stat: __os_stack+0x2b
    lt-db_stat: __os_abort+0x1d
    lt-db_stat: __db_assert+0x47
    lt-db_stat: __env_set_state+0x53c
    lt-db_stat: __env_attach_regions+0x38b
    lt-db_stat: __env_open+0x154
    lt-db_stat: __env_open_pp+0x334
    lt-db_stat: lt-db_stat
    So db_stat is opening an environment, attaching to its region, and then __env_set_state() calls __env_alloc(). It is __env_alloc() which fails with ENOMEM after some point when there is no more space to be allocated from the shared region. And I'm still looking into that space would be returned to the shared region.
    Thanks,
    Sandra

  • Content canvas is not displaying . It contain only one control block .

    Hi ,
    In my form , i have only one control block . in this block i have one display item. I have specified canvas for this item as "CANVAS4".
    I have created "canvas4" . and i have adjusted display item position in canvas. In this case while running form , it is not displaying my content canvas.
    Canvas is disappearing .
    Can any one please help me .
    Thanks in advance ,
    Sanjeev.

    Please take a look at: http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
    In order for anyone to offer valuable feedback, we ALWAYS need to know what product versions you are using, which Operating Systems are involved, client side information (browser, jre, os, etc), and if an error is involved, what are the details of the error.
    Craig...

Maybe you are looking for

  • Photo Settings in iMovie HD

    When I click on "Photo Settings" to change the Ken Burns settings...the current photo that I am trying to change goes black which prevents any change to photo settings. I downloaded iMovie HD since iMovie 08 does not allow many alterations. Any advis

  • Pass a variable from a method to another

    Hello, how is it possible to use, in a method, a variable instanciated in another method? None of them is a constructor. I saw many examples in the tutorials with constructors, but there it's different... This is a piece of my program: String string_

  • IPad screen issue, please help.

    Hello, I got an iPad Air 2 brand new from Apple a little over a week ago.  I picked it up with one hand and noticed that the screen got a little pressure on it (you could see darker colors around the area I picked it up).  I don't know if this is a c

  • I WANT MY NOTES!!

    I have done some research on the topic and it appears that notes on the iPhone can not sync with the computer... many people have asked the question and I have found some work-arounds as well as some people proclaiming "this was fixed in Leopard"....

  • Sorting slideshows by name

    Im new at this so please bear with me if this is a simple question. Im creating a menu with different submenus. Each submenu with multiple iphoto slideshows. When I go into each individual slideshow, I can see their names but I cannot sort it. I have