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.

Similar Messages

  • How to display the Form output in multiple languages ? ------ Urgent

    How to display the Form output in multiple languages ? -
    Urgent

    Hi,
    Do u mean the Form output in 2-3 languages ...like form output will be having english russian etc...
    for the above case , what u have to do ...
    first have to get the transalations for all the fields
    say for example : if the english word is PO Number , then u have to get the transalation text for PO Number :
    after this , what u have to is ,,, Log on to SAP with russian language ,  then in the form o/p u have to paste that russian test ( translation text ) ...
    do like this for all the components in the form .
    Reward Points if it is Useful.
    Thanks,
    Manjunath MS

  • JSP, Data tags, How to build a form edit with multiple records

    Hi, I'm using Jdev 9i.
    I would like to have a JSP form where I can update, delete, insert records displayed in the same page.
    I know that I can use the data tag jbo:DataEdit to do it, but it only works with a single record, I want to have several records in the same page, displayed horizontally.
    The best example is a form to add items in an invoice:
    Productid description quantity price
    1001 xxx 10 20.00
    1002 yyy 15 30.00
    1003 zzz 7 10.00
    Could you give some help please?
    Thanks in advance.

    The form display is dictated by how you process the submit. I would build the form by using standard html tags. Here is another pseudo example:
    <FORM ACTION="target.jsp" >
    <TABLE>
    <TR>
    <TD>
    DeptNo
    </TD>
    <TD>
    DName
    </TD>
    <TR>
    <%
    int nRow = 0;
    %>
    <jbo:RowsetIterate datasource="ds">
    <%
    // increment the row number
    nRow++;
    String sDeptno = "Deptno" + nRow;
    String sDname = "Dname" + nRow;
    String sRowKey = "RowKey" + nRow;
    %>
    <jbo:Row id="myrow" action="current">
    <TR>
    <TD>
    <input type="text" name="<%=sDeptno%>" value='<jbo:ShowValue dataitem="Deptno" />' />
    </TD>
    <TD>
    <input type="text" name="<%=sDname%>" value='<jbo:ShowValue dataitem="Dname" />' />
    <input type="text" name="<%=sRowKey%>" value='<jbo:ShowValue dataitem="RowKey" />' />
    </TD>
    <TR>
    </jbo:Row>
    </jbo:RowsetIterate>
    <input type="submit" />
    </TABLE>
    </FORM>
    NOTE: This should get you started!!!

  • 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

  • How do you insert new records into multiple tables using the same unique primary key?

    I’ve created a PHP site and MySQL server using a free app called XAMPP.  I have successfully created a form in Dreamweaver that will write data to a (name) table in the SQL database.  Here’s my question: How do you write to two (or more) tables in the same database and pass the same primary key to both tables?  In the SQL database, I defined the first field as ID and set it as the primary key with auto update.  So, when you insert a new record, it creates a unique primary key for that record.  In my form, I’m capturing info that needs to be stored to two tables at the same time; a Name table and Address table. Since the Name and Address tables use the ID field as the primary key, I believe I will need to pass the ID value from the Name table to the insert of the Address table to insure they both have the same primary key, right?

    No. You probably need the primary key from one table to be a foreign key in the other tables. In any case, I believe you can use two methods to obtain the auto generated key. First with SQL:
    http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
    And the other using a PHP function:
    http://us3.php.net/mysql_insert_id

  • How to submit InfoPath form data to multiple SharePoint lists at one time?

    Hi,
    I'm looking for a way to submit certain data in InfoPath form to separate SharePoint lists at the same time. I have a form that has two views with many data in them. I want to keep these data in separate SharePoint list besides keeping them in the XML. I know that you can submit to a form library using SharePoint document library data connection, but I'm not sure if you can use several data connections for submitting data to multiple SharePoint lists. Is it only possible to do using code? If yes, can anyone show a sample. I have never coded in InfoPath, though I used C# a lot in .Net.
    Thank you!Regards,
    R.D.M.

    This is an old thread but I tripped over a codeless method to do this with OOB InfoPath 2010 and SP 2010. 
    Assuming your main InfoPath form is published to a document library with the promoted fields that you want to see.
      Publish your form to a new document library to capture the secondary data fields that you want separated out.
    Using the Publishing Wizard do the following:
    Go to – File then Publish
    Select SharePoint Server “ Publish form to a SharePoint Library”
    Enter location of your SharePoint or InfoPath Forms Services Site: 
    accept the default in this field from the first published event
    Next screen, keep the default or change it, Form Library, Site Content Type or Admin Approved
    Next screen, What do you want to do?
    Create a new form library
    Add new document library name and description
    Next screen, Remove all promoted fields not applicable to the new library and add all of the ones you want to see data for.
    Click Next and Publish
    Come back into the form: If you don’t have buttons added directly to the form to submit or update, add them.
    Create a new Action rule on the button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use data connection to the second library created
    Create a second new Action rule on the same button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use original data connection to the library
    Then you can add another action to close the form or do whatever you need.
    Republish the form to both libraries to set the template for both.
    File – Publish – SharePoint Server
    Select Secondary library from drop down follow the rest of the prompts
    Follow step 5a again, select Primary library from drop down, Add back in all of the promoted fields needed for the primary library and follow the prompts.
    DOCUMENT YOUR FORM WELL FOR MAINTENANCE
    Special considerations, your primary library needs a unique ID to reference in your secondary library.
    Your secondary library will need a unique ID that is not related to the primary if you are going to store multiple records for a single primary library reference. 
    Example: One form, multiple updates.

  • How to alter the default profile for multiple users

    I am trying to alter the default profile assigned to users during user creation to a new profile. I know to change the profile for one user using the syntax
    alter user abc profile profileabc
    The issue I have is that there are 100's of users under default profile and changing for each of them manually would be difficult. The approach that I see is to write a shell script where I connect to the db and get a list of all the users with default profile. Then I loop through the file making connection to the db each time and executing the alter statement.
    Please help if you think that there can be a more efficient approach to this.
    Thanks

    alter user abc profile profileabcspool newsql.sql
    select 'ALTER USER '|| USERNAME || ' PROFILE NEWPROFILE;' FROM DBA_USERS;
    SPOOL OFF
    @newsql.sql

  • How to use one form to update two tables

    How can I do that? HTMLDB wizard or form on table doesn't give me an option to use more than one table in a form or I don't know about it. I created new process which redirects the form to another page after submitting the form. On the second page I created new process which uses the same variables from the previous form page. This process runs on page load before header but it is just not working right.
    So, what is the proper way to update two tables with the same form fields?

    Hello Vikas,
    "The Automatic Row Fetch and Automatic DML processes are a pair, you can't have one without the other."
    Are you sure about that? I have a page, which populate some of the items from TableA, using manual select statement, and after the user input, save some of it in TableB, using Automatic DML. No ARF in this process and it seems to work just fine. Come to think of it, what about a simple form, populated entirely by the user input, and then being saved to the db, using Automatic DML? No ARF here also.
    For the problem in hand, if you can't have more then one Automatic DML per page, I think that the simplest solution will be to define a pl/sql process, with two INSERT statement to the two different tables.
    Regards,
    Arie.

  • Single form to update multiple tables

    Hi,
    I have a strange request but I hope it makes sense.
    I have to create a front end to maintain roughly a 100 tables, this will increase to about 200 in the future. I have no control over the table structure so this is what I am stuck with.
    I could create a tabular form for each table but this would mean that each new table that comes on line I would have to add another page
    So rather than doing this what I thought was having one dynamic tabular form where the column headings would come from the table / column headings and the form get / update would be dynamically created. One problem I cant guarantee the tables will have the same number of columns.
    So the user from a drop down list could select a table name and that table will be displayed in a tabular report, they select another table from the drop down list and that table is displayed on the same page.
    That way there would be only one form and I could add a page where the users could add additional tables to be used by the app as they become available
    Is this possible using apex?? Has anyone done anything similar before and if so are there any pointers or examples they could give me.
    Hope this makes sense
    Thanks in advance

    Hi,
    Thanks for this, it is what I'm after and part from the add row functionality I think I have a working version.
    The next thing I have to do is make it work with tables with different numbers of rows, do you have any tips or hints on how best I can achieve this??

  • URGENT: tabular form based on multiple tables

    Hi All,
    Its very urgent.......Can anybody tell me how to create a single tabular form to insert/update values from different tables.
    I want to create a tabular form with 3 cols. 1st col should be from one table and another two cols from other table.Please help.........
    Thank You
    Regards,
    Vinaya.

    You can use iframes in your page: (an iframe is a frame in your page. In this frame you can load another page) that way you can create three pages. The first page is the master page. The second and third page which also have tabular forms, are loaded as iframes in the first page
    The iframe is created as follows on your first page:
    1.create a html region
    2 create the tabular form on the second and third page
    3.reference the pages by entereing  the following code in the regions that will be used for displaying them:
    <iframe name="Your_region_name"   id="123" frameborder = "0" src=the page referenced width="580 px" height="250px" scrolling = "auto"></iframe>
    for example:
    <iframe name="Charge_Region"   id="123" frameborder = "0" src="f?p=&APP_ID.:14:&SESSION." width="580 px" height="250px" scrolling = "auto"></iframe>

  • How do I collate the results of multiple tables ...

    into a new row in another table?
    I have 12 monthly expense tables, which each have their columns totaled at their bottom via regular sum formulas. I need to create a row in an additional year end table, which 'gets' all those rows values from the twelve mentioned above.
    Please forgive my spreadsheet ignorance, and thank you. As a producer of 40 years, math just isnt a strong suit.

    I think that the ony way without complicated formulas is to start your equation and click on the cells to add up or average, etc... as you want them. You can select a cell in another table to go inside a function by just clicking on them, and your SUM and AVERAGE functions are able to take multiple ranges of numbers as argument, just separate them with commas.
    If you wnat the harder version, just let us know,
    Jason

  • How to change the same cell in multiple tables at the same time

    help if you can,
    i have a workbook
    workbook has 10 sheets
    each sheet has 1 table
    when in excel you were able to select a sheet then hold control and select another, this would group the sheet as if to make them the same. change a single cell in one of the sheets and this changed cell would be also be changed in all grouped sheets. is there the same functionality in numbers?

    It's funny.
    This question was asked several times in the last ten days.
    The feature is unavailable.
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'10
    Yvan KOENIG (VALLAURIS, France) jeudi 8 octobre 2009 18:57:14

  • How to see the record stored in multiple table

    please send me the

    Hi,
    You can do it like this:
    DECLARE
    rec_count NUMBER;
    BEGIN
    FOR tbl_cur IN (SELECT table_name from user_tables)
    LOOP
      EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM '||tbl_cur.table_name INTO rec_count;
      IF rec_count >0 THEN
        DBMS_OUTPUT.PUT_LINE(tbl_cur.table_name||' has data.');
      ELSE
        DBMS_OUTPUT.PUT_LINE(tbl_cur.table_name||' has no data.');
      END IF;
    END LOOP;
    END;**not tested**
    Regards
    Avinash

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • How to create multiple tables in Adobe air?

    Hi, I am using Flash CS5 coding for adobe air 2.0.
    How do you create a database with multiple tables and link them together?
    I know how to do it in SQL just can't seem to get it to work in Flash CS5 Adobe air.
    The following is ONLY an example of a database layout that shows linking tables together.
    Table CUSTOMER
    customerID - PK
    customerName
    Table ITEMS
    itemID- PK
    itemName
    Table ORDERS
    orderID- PK
    data
    customerID = 1
    customerName = bob
    itemID = 1
    itemName = cup
    orderID = 1
    output example
    1,bob,1,cup,1
    Thankyou

    Bump

Maybe you are looking for