Form on multiple tables

Hi APEX friends
I am working on a project where i have to create a form on report (creating on 1table is simpler ) , on multiple tables
one table has Primary key which is foreign key to many other table.
First i want to user to enter data to two main tables ( for ex , entering new employee (name , address etc ) and second would be employee health data ) after that only they can enter further details to other table ( ex HR table wages , pto etc. )
How can i make them insert  in primary table  and submit (insert ) on one button only !!
what approach i should use , (except wizard)?
pls help me in explore this issue.
Thanks
Ns

Hi,
you can create a wizard with several pages:
page 1 for entering new employee (name , address etc )
page 2 for be employee health data
page 3 and further for the other data
If the user isn't filling in the right information in one of the wizard pages don't allow them to take a step further in the wizard.
Finally make a summary page and on that page you can insert the data from the previous wizard pages, based on the page items on those pages, into the tables.
regards,
Erik-jan

Similar Messages

  • How to build a form with multiple tables in oracle application express

    Hi everyone,
    I have got problem in building a form with multiple tables.I have a main table with (20) columns and this main table is related to the other tables with the primary key-foreign key relation ship.My requirement is i have to build a form which has fields from many tables and all the fields are related to the main table using (ID) column.In that form if i enter ID field i have to get information from differnt tables.
    Please help me to solve this (building a form with mutiple tables)
    Thank you
    sans

    Sans,
    I am no Apex expert, but with a situation as "complex" as yours, have you thought about creating a VIEW that joins these 7/8 tables, placing an INSTEAD OF trigger on that view to do all the business logic in the database, and base your application on the view?
    This is the "thick-database" approach that has been gaining momentum of late. The idea is to put your business logic in the database wherever possible, and let the application (Form, Apex, J2EE, whatever) concentrate on UI issues,

  • CREATING A FORM UTILIZING MULTIPLE TABLES

    I'd like to know if it's feasable to create a form using multiple tables and if so, how?
    Thanx

    sgtmaj,
    It's feasible. You'll have to create the form manually. This part of the documentation describes how that's done.
    http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b16373/bldapp.htm#sthref960
    Sergio

  • Inserting data from jsp form to multiple tables !

    Hi,
    I want to insert data from jsp form to two tables
    tables are
    (1) Form
    formId (PK)
    deptName
    (2) Data
    formId (FK)
    sNo
    description
    itemCode
    and the problem is that i want to save information form a jsp form to above two tables and i have only one form.
    so how do i insert data from a jsp form to multiple tables.

    You already know what your form in the jsp will be and what fields they are. You also already know what your database looks like. Using one form, you should be able to break the data down, and give it certain ids and/or names, so that when the form is submitted, you retrieve the correct values corresponding to a specific field and insert it.
    Unless there is something else I am not catching, this seems pretty straight forward.

  • Microsoft Access 2010 Creating a Form from Multiple Tables

    Hi.
    I am brand new to Microsoft Access and have had some exciting success making forms from single tables. This has made my data entry life much easier. However, I am continually stumped on one form I want to make. I would like to make a form that will let me
    update which brands retailers are selling. Most of this information is in my SalesHx table. However, my SalesHx table only uses RetailerID and BrandID to record history. The Brand's name (linked to a BrandID) is stored in my Brand Table and the Retailer name
    is stored in my Retailer table (linked to a RetailerID). I would like to be able to see the brand's name and the retailer's name when entering in data on a form, since I cannot remember the ids that associate with the names. I have been able to make a form,
    with a subform, that displays all of the information I want to see. When I update this form, though, with a new record, it invariably thinks that I am adding an entirely new record, not simply recording a new sales date for an already known brand. Even if
    I make the brand name a combo box that is limited to the fields on my table, this still happens. I will have BrandX as brand number 100 and as brand number 300 if I add it in through my sales history form. I am ready to throw access out the window. Can anyone
    offer advice?

     When I update this form, though, with a new record, it invariably thinks that I am adding an entirely new record, not
    simply recording a new sales date for an already known brand. 
    In what table is the SalesDate recorded?
    Build a little, test a little

  • Tabular form on multiple tables

    Hi there,
    I'm hoping to create a Tabular Form which is based on either a view or a join, whichever is easier.
    We have two tables - Division and Targets. Division references Targets on target_id. The tables share a one-to-one relationship. I was originally told to simply merge the 36 fields in Targets to the Division table, however, we're likely going to have other tables (such as Department and Section) which also share a one-to-one relationship with Targets.
    Is there a way to accomplish this with the Wizard, and if not, does anyone have any tutorials/advice on how to create PL/SQL to handle this?
    Thanks,
    Andrew

    Mike
    "Just for querying the data and making it appear in a single tabular form"
    ... hum so you would have to create a custom process anyway for the update - in which case, why have the view in the first place, there's no point.
    >
    What are the odds of moving the rows :P works for me anyways =P.
    >
    I'm not saying it's likely, but it can happen. As a developer you should take this into consideration when designing applications.
    So
    CREATE TABLE rowid_test
      pk_col             NUMBER PRIMARY KEY,
      col1               NUMBER,
      col2               VARCHAR2(6 CHAR)
    TABLESPACE DAT_DATA;
    CREATE SEQUENCE rowid_test_seq
      START WITH 1
      MAXVALUE 999999999999999999999999999
      MINVALUE 1
      NOCYCLE
      CACHE 20
      NOORDER;
    BEGIN
      FOR i IN 1 .. 150
      LOOP
        INSERT INTO rowid_test
        (pk_col,
         col1,
         col2)
        VALUES
        (rowid_test_seq.nextval,
         ROUND(DBMS_RANDOM.VALUE(0, 100000), 2),
         DBMS_RANDOM.STRING('x', 6));
      END LOOP;
      COMMIT;
    END;
    CREATE OR REPLACE FORCE VIEW rowid_view AS
    (SELECT rowid the_id, t.*
    FROM rowid_test t);
    SELECT *
    FROM (SELECT /*+ FIRST_ROWS(n) */
                 a.*, ROWNUM rnum
          FROM(SELECT *
               FROM rowid_view
               ORDER BY pk_col) a
          WHERE ROWNUM <= 30)
    WHERE rnum  >= 15;
    DELETE FROM rowid_test
    WHERE pk_col = 17;
    COMMIT;
    INSERT INTO rowid_test
               (pk_col,
                col1,
                col2)
         VALUES
               (17,
                ROUND(DBMS_RANDOM.VALUE(0, 100000), 2),
                DBMS_RANDOM.STRING('x', 6));
    COMMIT;
    SELECT *
    FROM (SELECT /*+ FIRST_ROWS(n) */
                 a.*, ROWNUM rnum
          FROM(SELECT *
               FROM rowid_view
               ORDER BY pk_col) a
          WHERE ROWNUM <= 30)
    WHERE rnum  >= 15;So row 17 could have a different rowid in the tabular form to the table itself.
    If the rowid is used to update then it could either not find the row or find a different row (ludicriously unlikely but you never know).
    So the next option would be to combine it with a primary key - very safe but you may not always find your row. So why not just use the primary key? Well, in this case we have two tables involved so we do not have a single PK on which to base the update... So we'll have to write a custom update procedure as APEX will base it upon the primary key... so not having a primary key is no longer an issue.
    Either way, your query is ambiguos
    CREATE OR REPLACE VIEW "HIHI" AS
    SELECT ROWID unique_rowid, d.Dep "Department", t.goal "Sales Goal"
    FROM Division d, Target t
    WHERE d.target_id = t.target_idWhich table is the rowid coming from??? This couldn't work.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)
    Edited by: Munky on Aug 28, 2009 10:53 AM

  • One form for multiple tables

    Hey,
    I'm Pretty new to Access, as I've been given units to cover for my college course.  Unfortunately my tutor has had this dumped on him too (so he's kinda self teaching as he goes as well)....
    My issue is that I am trying to create a single form that will allow for all the information to be entered onto, which will then disseminate that info to the separate tables.
    The database is a simple film database that has 8 tables in total. Seven are data tables (Filminfo; Certificate; Genre; Series; Role; Producer; Actor) and the seventh is a central table that is filled with keys as a connection for them all. Series is also
    an off shoot from the filminfo table. I do have a pic, but I couldn't attach an image until my account was verified!
    This is how we were advised to set it out and as far as I can tell the other parts that have been built are working. I know there is a way to do it, but tonight the internet is failing me, that, or my lack of understanding
    exactly what I'm reading.
    Therefore any help that could be offered by anybody that can work out what I'm rambling on about, would be most appreciated (even more so if in layman's terms)

    What you have in relational database terms is a 7-way many-to-many relationship type between the 'referenced' tables.  This is what your eighth table is modelling by resolving the many-to-many relationship type into seven one-to-many relationship types.
    The problem here is that you are going to end up with a huge amount of 'redundancy' in the table modelling the relationship type.  At least some of the other tables represent entity types of which there can be more that one instance per film, e.g. there
    will be more than one actor in most films.  So let's say you record four actors for a film.  That means four rows in the table, but you then have to record the producer of the film four times as well, entering the same foreign key value into all
    four rows.  That's what's meant by redundancy.  Redundancy is a bad thing because it leaves the table open to the risk of 'update anomalies', e.g. two or more different producers could be inadvertently entered in different rows of the four. 
    Which is the correct one?  There's no way of knowing.
    So what relationship types do we really have here?  Let's concentrate on films and actors.  Each film can have many actors, and each actor can appear in many films (think Michael Caine!), so the relationship type is many-to-many.  Now a many-to-many
    relationship type cannot be modelled directly between two tables, it's done by a third table which resolves it into two one-to-many relationship types.  So in broad outline the tables would be like this:
    Films
    ....FilmID  (PK)
    ....Title
    ....ReleaseDate
    ....etc
    Actors
    ....ActorID  (PK)
    ....FirstName
    ....LastName
    ....etc
    and to model the relationship type:
    FilmActors
    ....FilmID  (FK)
    ....ActorID  (FK)
    ....Role
    The primary key of this last table is a composite one made up of the two foreign keys FilmID and ActorID.
    Karl's already given you a clue how to represent this; by means of a form/subform.  The form would be based on Films and the subform on FilmActors.  For a simple example of this basic type of many-to-many relationship type and how to represent it
    in a form/subform take a look at StuidentCourses.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    This little demo file illustrates a number of interfaces using forms, but just look at the conventional form/subform set-up.  The other two are just there because from time to time people have asked how to do it in these other ways.  Quite why they
    want to is another matter!
    My demo just has one subform, but there's no reason why you can't have multiple subforms in a films form of course, each for a different related entity type, each linked to the parent form on FilmID.  Tip:  to save space put ach subform on a separate
    page of a tab control, with the main film data in the parent form above the tab control so it's visible permanently as you move between different pages of the tab control.
    BTW in my StudentCourses demo try typing into the combo box in the subform the name of a new course not currently listed, French say, and see what happens.  Take a look at the code in the combo box's NotInList event procedure to see how it works. 
    For other uses of this event procedure take a look at the NotInlist demo file in the same OneDrive folder.
    I can sympathise with your tutor BTW.  My next door neighbour is head of the art department at a high school, but she has to teach maths also!
    PS:  I included Role as column in the FilmActors table, but what about Alec Guinness in Kind Hearts and Coronets? (google it if you're not familiar with the film)  How do you think you'd handle that situation?
    Ken Sheridan, Stafford, England

  • Insert records from user form to multiple tables in same database

    Hi Experts, I need your help. I have a form that has multiple text fields that I need to insert the records to their each respective table. For example: The first name field needs to go the the name table, address goes to a seperate table, phone goes to a seperate table and so on.
    Is this possible to do?
    Thanks Much
    Sham

    The same for ASP, JSP or PHP.  Just the code syntax is different for each language.  Are you using MySQL, Access or ?
    In any case, create the three recordsets on the database and use insert queries.  If you don't know what one is, google insert query and you will see the syntax. 
    Here is a good example out on the web
    http://www.stardeveloper.com/articles/display.html?article=2000032601&page=1
    In your case you would get the values for the inserts from the form data and only need to open the database connection once.
    Good luck.
    Walt
    B & B Photography

  • Creating a form that populates multiple tables

    Hi,
    I need to create a registration form which inserts data into multiple tables (USERS (master-table), PHONES, ADDRESSES, EMAILS, etc) at once. I've been looking through the docs and the only way I've found yet is to build the form on a procedure. Other methods have restriction on using maximum of 2 tables.
    What is the best approach for building a form on multiple tables in htmldb?

    Either do it on a procedure, or simply write the insert in Process yourself:declare
      l_new_deptno number;
    begin
      insert into dept(dname)vales(:P1_DNAME) returning deptno into l_new_deptno;
      insert into emp(ename,sal,deptno)
      values (:P1_NAME,:P1_SALARY,l_new_deptno);
    end;Thanks,
    Tyler

  • XSU and multiple tables

    Hi,
    So far I have success using XSU to store an XML file to a single table datawise where each element of the XML correspond to the field name of the table.
    But I have couple of questions.
    1. I am still using ROWSET and ROW tags in my XML. Can i change it to something meaningful say...PRODUCTS and PRODUCT respectively? If so how can i do that?
    2. How do i stored an XML onto more than one table. Each PRODUCT have some linked information to be stored in another table. How can i do this?
    Basically this time the XML will look somewhat like this:
    <?xml version="1.0" ?>
    <ROWSET>
    <ROW num="0">
    <BRAND>brand name</BRAND>
    <CATEGORY>category</CATEGORY>
    <ROWSET1>
    <ROW1>
    <MERCHANT>merchant name</MERCHANT>
    </ROW1>
    </ROWSET1>
    </ROW>
    </ROW>
    </ROWSET>
    Please help me. Thank you.
    Regards,
    Abdul Rasheed

    Hi,
    search this xml form for 'multiple tables' and you will learn a lot about it. it seems that using XSU you can only to save to one table or a view. Possible solutions are:
    1. create a view over those tables. If your view is complex and not
    updatable then you can use insteadof triggers with your
    non-updatable view"
    2. split your mutl-level XML to several single level XML files and save each xml seperately.
    3. And another person was nice enough to mail me the following solution, which might be of help. i copy the mail here...
    I saw your message in the XML oracle forum, and i've just finished a small project for my company in doing things like saving an XML document to a DB table.
    I think that saving the XML document in one or many tables is not different because what you need is to build dynamic SQL queries to update your tables so you need to guess the setter part of the querry.
    UPDATE my_table SET column1=value1,column2=value2... WHERE table_key=key_value.
    the best way to do the job is to use an XSLT processor, you give it your XML document and an XSL document for filtering the output.
    the output of the XSLT processor could look like:
    <?xml version="1.0" ?>
    <ROOT>
    <TABLEROW table="table1">
    <COLUMN1_1>value1_1</COLUMN>
    </TABLEROW>
    <TABLEROW table="table2">
    <COLUMN1_2>value1_2</COLUMN>
    </TABLEROW>
    </ROOT>
    now it's easier to guess the SQL queries all you have to do is to parse this output document and say in you code something like:
    String[NBR_OF_TABLES] Queries;
    int i=0;
    -- Loop inside the xml document {
    Queries="UPDATE ";
    Queries[i]=+(curent_node.getAttribute("table")).getNodeValue();
    -- Loop inside the curent node {
    column_name=current_node.getNodeName();
    column_value=curent_node.getChild().getNodeValue();
    Queries[i]=+" SET "+column_name+"="+column_value; //FIRST TIME
    Queries[i]=+","+column_name+"="+column_value; //2,3,4...
    you may need some type conversion, from string to numbers,and dates, and the WHERE part of the query is up to your indexation mecanism
    of course you can put the tables primary keys values and names rigth in the yout XML document.
    and last you simply execute the Array of queries you have:
    for (int i=0i<NBR_OF_TABLES;i++)
    execute(Queries[i]) .
    hope this helps.
    abdul rasheed

  • Adding data to multiple tables using one form in Access 2010?

    Hi All,
    I have a access database with two tables and I want to create a single form to enter data into that tables.
    How to adding data to multiple tables using one form in Access 2010?
    I don't have to much knowledge of access database?
    Please help me
    Thanks
    Balaji

    You really don't enter identical data into 2 tables.  You enter dat into one single table, and then you have an unique identifier that maps to another table (you have a unique relationship between two tables). 
    Maybe you need to read this.
    http://office.microsoft.com/en-001/access-help/database-design-basics-HA001224247.aspx
    Think about it this way...  What is you update data in 2 tables, and then the data in one of those tables changes, but the data in the other table does NOT change.  WHOOPS!!  Now, you've got a BIG problem.  For instance, you have a customer
    named Bill Gates.  In one Table you update Bill's address to 1835 73rd Ave NE, Medina, WA 98039 and in the other table you accidentally update Bill's address to 183 73rd Ave NE, Medina, WA 98039.  Now you have 2 addresses for Bill.  Why would
    you want that???  Which is right?  No one knows.  If you have one address, you just have to update one address and if there is a mistake, you just have to update one address, but you don't have to waste time trying to figure out which is right
    and which is wong...and then update the one that is wrong.
    Post back with specific questions.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How to alter a Form to modify multiple tables

    I want to create a form that will insert or update into multiple tables at once.
    I have provided a picture of what i have in mind: http://imageshack.us/photo/my-images/21/custformexample.jpg
    In this example I have 3 tables:
    Customer (Cust_ID, Name,Address,Email,Phone);
    Account_Manager(AM_ID, Name,Address,Email);
    Customer_Account_Managers(Cust_ID,AM_ID);
    A customer can have 0 to many Account Managers.
    I have created a form on table with report with which I can see a report of all customers and click Edit to edit a customer or Create to create a new one.
    In this form I want to add a select list that includes all Managers (I know how to create a select list and how to access it's value). I also want a report on the Account Managers which are associated with the customer, and I want to be able to add to this list, which will be saved into the Customer_Account_managers table as soon as i click Save.
    Please provide me with some tips as to how to do this.
    Thanks a lot!

    Always include the following information when asking a question:
    <ul>
    <li>Full APEX version</li>
    <li>Full DB/version/edition/host OS</li>
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)</li>
    <li>Browser(s) and version(s) used</li>
    <li>Theme</li>
    <li>Template(s)</li>
    <li>Region/item type(s)</li>
    </ul>
    popovitsj wrote:
    I want to create a form that will insert or update into multiple tables at once.
    I have provided a picture of what i have in mind: http://imageshack.us/photo/my-images/21/custformexample.jpg
    In this example I have 3 tables:
    Customer (Cust_ID, Name,Address,Email,Phone);
    Account_Manager(AM_ID, Name,Address,Email);
    Customer_Account_Managers(Cust_ID,AM_ID);
    A customer can have 0 to many Account Managers.
    I have created a form on table with report with which I can see a report of all customers and click Edit to edit a customer or Create to create a new one.
    In this form I want to add a select list that includes all Managers (I know how to create a select list and how to access it's value). I also want a report on the Account Managers which are associated with the customer, and I want to be able to add to this list, which will be saved into the Customer_Account_managers table as soon as i click Save.You can create a database views based on these tables, and create a instead of insert/update/delete trigger to populate the corresponding tables when fired.
    Create an APEX form using wizard based on this database view.

  • Insert/update multiple tables from one form.

    I'm working on an app. that requires the user to fill out a form. The contents from the form is then used to either insert new records or update existing records in multiple tables. Is that possible? Can someone give a details example?

    You should create a form like you would create it having one table. Use row_id as primary key. The rest of the process are done by the triggers - those will take care of updating the right table depending which column was hit.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Join Multiple Tables in Forms 9i

    I am attempting to create a tabular form in 9i using two tables. The tables have a one-to-many relationship. The Detail table is the main table for the form and I wish to pull in a column from the master table.
    It is similar to the example provided in the on-line help for FORMS 9i 'JOIN of Multiple Tables'. I have gone through all the steps provided. The form compiles OK, however, when I execute_query I get the following error message 'FRM-40505: ORACLE error: unable to perform query.' It does not matter whether the form is of type form or tabular.
    If I create a tabular form using the DETAIL table ONLY and then execute_query - the form works correctly.
    Thank you in advance of any help
    Michael Redford

    Andrew, Thank you for your reply.
    I concur as I have double checked everything and the Query now works. However I still have a problem.
    The error 'FRM-40657 Record changed or deleted by another user' appears as soon as I attempt to change a users record. This form and system is still in development. No other developers/users have access to the tables or forms.
    If I remove all references to the joined table then I can update the same field with no errors.
    I am trying to display the users name where the users name is not a field on the current table.(similar to creating a form for Employees details and displaying the Department Name for each employee.)
    Re: Display Error. We have very recently upgraded from Forms 6i to Forms9i. In 6i we used the Display Error in the Runtime Previewer to debug a Form. Forms 9i runs the form on the web and I'm not sure if the 'Display Error' feature is still available.
    Thank you
    Michael Redford

  • Inserting into multiple tables on one form using UIX

    We are developing an application using struts and UIX. We would like to be able to insert into three tables on one form(view). How can we accomplish this?

    This is more of an ADF question, you'll need to set up view object, than just drag it from the data control palette like normal.
    If it's not already set up as a view in the db (split into multiple tables), you'll need to create a view object that includes all the fields you want, based on multiple entity objects.

Maybe you are looking for