3 Replies Latest reply: Feb 17, 2013 3:22 AM by KPR RSS

    insert data into tables when selecting list item

    991535
      this is venkatesh i want code for below requirement

      i have two tables master and detail in both tables i have column HO_UNIT values are HO and UT

      and i created i list item separately in form builder.
      and i created SAVE Button

      i want answer like:

      after selecting value in list item that value should be insert into both tables when i press SAVE Button .



      please send d2k form level code please.................
        • 1. Re: insert data into tables when selecting list item
          Etbin
          please send d2k form level code please.................
          I don't know what you mean but from the Database perspective you might need something as (take it as a template)
          insert all
            into master_table (ho_unit) values (the_value)
            into detail_table (ho_unit) values (the_value)
          select :selected_value the_value
            from dual
          you should by all means expand the column and value lists as appropriate according to the subquery (final select).

          Regards

          Etbin
          • 2. Re: insert data into tables when selecting list item
            Arild
            I'm not sure either, but I think he is referring to Oracle Forms.

            Venkatesh, you should try this forum instead: Forms

            Rgds,A
            • 3. Re: insert data into tables when selecting list item
              KPR
              Hi

              Welcome to OTN.....!!

              While creating list Item in the form Builder... You should answer the following properties.
              1. Item Type ... List item
              2. Default Value ..  One of the value in the list item.
              3. Base Table item .... True
              4. List elements ..... Elements of the list box
              5. List Style
              
              Then Save button ... open write code(Trigger when button pressed) 
              
              commit;
              clear_block(do_commit);
              KPR