This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Jun 26, 2013 2:52 AM by Ramani_vadakadu RSS

Master with more than One details

Maahjoor Newbie
Currently Being Moderated

Dear All,

i am using Apex 4.2, oracle database 11g R2 and internet explorer 9.

I have three tables,A,B and C.

A is master table.

B and C are details tables for A.

 

how could i create a master with 2 details form in such a way that data entry are possible in both the details  ?

i search internet, but am failed with this.

 

kindly guide accordingly.

 

Regards.

  • 1. Re: Master with more than One details
    TusharThakker Explorer
    Currently Being Moderated

    If there is one-to-one relationship between the columns (i.e. the columns in B and C are not "derived" from columns in A but are inserted manually) then you can create a view including A,B and C and this view will be insertable. So you can insert into this view which will actually insert records in A, B and C in their respective columns. The remaining columns must have a default value.

     

    Regards

    Tushar

  • 2. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    Thank you Tushar,

     

    actually, i need the master with more than one details for many situations, and for many senario in my application.

    i need a standard way to do that.

    in the case of A,B and C, my tables are below, i was wrong in my previous post, C is Child of B, not A.

    [code]

    create table main_expenses_head(main_exp_id number primary key,

                                                       main_exp_description varchar2(200) unique not null);

    create table sub_expenses_head(sub_expense_id number primary key,

                                                      main_exp_id number references main_expenses_head(main_exp_id) not null,

                                                      sub_exp_description varchar2(200) not null);

    create table expenses(exp_id number primary key,

                                       sub_exp_id number references sub_expenses_heads(sub_exp_id) not null,

                                        main_exp_id number references main_expenses_head(main_exp_id) not null,

                                        expense_description varchar2(200) not null,

                                        exp_date date not null,

                                        Receipt varchar2(20),

                                        amount number not null,        

                                        remarks varchar2(2000));

    [/code]

     

    Kindly guide how to implement master with two editable details in apex .

    why not the [code] and [/code] not working in the forum?

    thanks.

  • 3. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    Hi,

     

    any help (in hope somebody have a solution)?

    regards.

  • 4. Re: Master with more than One details
    Bas de Klerk Pro
    Currently Being Moderated

    Hi,

     

    ans easy way to do this is to create a form for your master table and add reports for each details which only displays the detail records for the current master.

    Add a new button to each report which points to a add/edit form for that sepcific detail.

     

    If you don't want your users to navigate away from the current master form page you can edit/add the details in a modal window ( using skillbuilders modal plugin ).

     

    Probably your also able to edit the details in multiple tabular forms on the master page but you need to code this manually and I think it's not as easy as the solutions above.

     

    Regards

      Bas


  • 5. Re: Master with more than One details
    Ramani_vadakadu Journeyer
    Currently Being Moderated

    what about child table structure? form model or tabular form? what about Seq # for both B&C table ? can you draw in paper raw model and publish here! me or any one can help you!

  • 6. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    thanks Basdeklerk,

    sorry for late reply( in meeting),

    i need the difficult way since it will make the page very user friendly.

    kindly tell the step

    (Probably your also able to edit the details in multiple tabular forms on the master page but you need to code this manually and I think it's not as easy as the solutions above.)

     

    i will really appricaite your kind help.

    we need this approach for many senarios.

    and i have search the internet for a very long.but failed to get a proper example to follow.

    regards.

  • 7. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    hi ramani

     

    i dont know how to publish  here things which i have in raw paper.

    sequence is below.

     

    1. master expense=TRAVEL EXPENSE

    2. sub expense=IN CITY TRAVEL

    3.

    expense= Bus

    expense=TAXI  etc.

     

    i think all should be tabular forms like grid with multiple row editibale facility.

    regards.

  • 8. Re: Master with more than One details
    Ramani_vadakadu Journeyer
    Currently Being Moderated

    yes you can create the master child report and one more grid with form region for another 3 rd child table.

    you can pass master seq # to both child table/separate(as your reg)

    we did the same(Semester>class>students)

  • 9. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    yes exactly!!

    but how to cook the rice???

     

    kindly guide thoroughly, we cannot proceed without this technique.

    we will really appriciate your help.

    regards.

  • 10. Re: Master with more than One details
    Pars Pro
    Currently Being Moderated

    Hi,

    i think create master detail form on A and B and create Tabular form on C and pass Table A's key reference to Tabular form C

     

    example C tabular query Contain Condition

    Where Main exp id = PX_Main_Exp_id And create jump to next page on which tabular form C present

    not possible to create Two tabular Form On same page so try this also refer following

     

    Another Oracle Blog: apex

     

    regerds.

  • 11. Re: Master with more than One details
    Ramani_vadakadu Journeyer
    Currently Being Moderated

    hai,

    *HomeApplication BuilderApplication 100Page 1>Region>form>Create Master Detail form>Report will be Master Table

    * rest of table should be tabular form with different page only(apex limited)

    *pass the parent value sq # to both table.

    how?

    each row to link another forms(tables as B&C) with pass the parent value.

    https://docs.google.com/file/d/0B_qZ9OVtwF4ic3B2R0RRRF9ya3c/edit?usp=sharing

    see my sample.we have three table linking with single record.

  • 12. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    Dear Ramani_vadakadu,

     

    if possible , kindly provide the source so we could follow and take benefit from your valuable work.

    your current reply is really helpfull, but we (the begginers) can't take benefit from that.

    we will appriciate your kind help Ramani.

     

    Regards.

  • 13. Re: Master with more than One details
    Ramani_vadakadu Journeyer
    Currently Being Moderated

    hai , please through the link and see the page source code.http://apex.oracle.com/pls/otn/f?p=4550

    application: 32172

    workspace: ram_r&D

    user/password: aramani/apex

    =============

    DB script will be in:

     

    HomeApplication BuilderApplication 32172Shared ComponentsStatic Files(legal script.sql)

  • 14. Re: Master with more than One details
    Maahjoor Newbie
    Currently Being Moderated

    Hi Ramani

     

    Thank you so much,(the stuff is looking very valuable.)

    a problem with the legalscript.sql is that when i click on it, it give the following message

    This text file is too large to edit. To change the content, you must edit the file on your local machine and upload it again.

     

    how to download the script, so that i will be able to import it into my database?

     

    thank you much Ramani. (you help more than my expectation).

1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points