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.

Similar Messages

  • How to use one commandButton to execute two tasks in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is �findInspector�. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two tasks in JSF.
    Thank you
    Waheed

    Just dopublic void execute() {
        anotherAction(inputValue);
    I guess those articles might be interesting about passing params and the usage of inputHidden and also about using datatables:
    http://balusc.xs4all.nl/srv/dev-jep-com.html
    http://balusc.xs4all.nl/srv/dev-jep-dat.html

  • How to use one commandButton  to execute two task in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is “findInspector”. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two task in JSF.
    Thank you
    Waheed

    Yes I did
    <managed-bean>
    <description>The bean for get project No</description>
    <managed-bean-name>projectBean</managed-bean-name>
    <managed-bean-class>
    mcscm.model.ProjectBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    Also I changed the method in the managed bean as follows:
    public String commandButton_action() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer dcb = (DCBindingContainer) vb.getValue(fctx);
    OperationBinding operation = (OperationBinding) dcb.get("projectNumber");
    operation.execute();
    return null;
    where projectNumber is my method in the java class of the application module "TaskInformationImpl". I made this method to be accessed from outside of ADF BC.
    I just create a sample code for projectNumber method for testing only as:
    public void projectNumber (String data){
    System.out.print(data);
    In the page Pagedef file I added this :
    <methodAction id="projectNumber"
    InstanceName="TaskInformationDataControl.dataProvider"
    DataControl="TaskInformationDataControl"
    MethodName="projectNumber" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="false">
    <NamedData NDName="data" NDValue = "#{bindings.ProjectNumber.inputValue}" NDType="java.lang.String"/>
    After I did all of this I get a new error like:
    javax.faces.FacesException: #{projectBean.commandButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adf.model.OperationBinding
    Is it very difficult to do this in JDeveloper?. yes ADF BC provide me a lot of facilities, but when I want to do a specific task I face a lot of troubles

  • How to use one form to calculate totals form 4 individual forms

    If i had 4 separate forms with 3 number fields each, how can i use one form to calculate theirs totals?
    Form 1 numbers + Form 2 numbers + Form 3 numbers + Form 4 numbers = Form with combined totals
    can anyone point me in the right direction?
    Thanks

    kwesij wrote:
    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...What's the problem? What does a brick wall look like?
    Connect to the database and execute four SQL INSERT/UPDATE statements as a single unit of work. The fact that you have one form shouldn't be an issue.
    I'll bet you're having trouble because you haven't layered the problem either in code or in your mind.
    I'd recommend that you write a POJO to take in some objects and execute the SQL. Once you have that running successfully you can worry about the form. Decouple the two.
    Computer science is all about decomposing large problems into smaller ones.
    %

  • How to use one form to submit data to 2 tables on mysql

    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...

    kwesij wrote:
    Can someone please help me on this,
    I am developing a jsp website and I want to use one form to submit data to 4 tables on mysql database and the tables are related by one foreign key.
    Can someone bail me out of this ....I've hit a hard brick wall!!!!...What's the problem? What does a brick wall look like?
    Connect to the database and execute four SQL INSERT/UPDATE statements as a single unit of work. The fact that you have one form shouldn't be an issue.
    I'll bet you're having trouble because you haven't layered the problem either in code or in your mind.
    I'd recommend that you write a POJO to take in some objects and execute the SQL. Once you have that running successfully you can worry about the form. Decouple the two.
    Computer science is all about decomposing large problems into smaller ones.
    %

  • Using a single Form to Update two tables.

    I would like some assistance please?
    I have an "<strong>Event</strong>" ,"<strong>Item</strong>" and "<strong>Item allocation</strong>" tables . The "Item_allocation" table serves as a composite table joining the "Item " and "Event" table. The relationships are as follows (*1*)Event :(*M*)Item and vice versa. * hence the reason for the third table.
    Attributes are as follows.
    <u>Event</u>
    Eventid(pk)
    Eventname
    Eventdate
    <u>Item</u>
    Itemid(pk)
    Itemname
    Itemcost
    Itemallocation_
    Item_allocationid(pk)
    Eventid(fk)
    Itemid(fk)
    <strong><u>What I'm essentially trying to achieve here is , allow the user to book and event and as part of that process be able to select multiple items.. I need the both "Event " and "Item_allocation" tables to be updated.</u></strong>
    Thank you in advance.

    Hi,
    Try creating the form based on a view and use an INSTEAD OF trigger to create the records in the two tables. Here's an example of this: Report & form on Multiple table
    Andy

  • How to use one forms fields, program units in another form.

    The whole proceessing and update is happening in one main form.
    Main form has all the fields and a reprocess button which re-creates records if they have error. Record name is the primary key.
    I have another small form, which just shows the list of record names in the system. I want a reprocess button next to each record name so that user will be able to just select any record name and press reprocess button to recreate any record data.
    There are a lot of fields in main form and program units , which are used by the reprocess button.
    Any suggestions like how to go for it?

    You can either pass all the relevant data from the Small Form to the Larger form and make it reprocess the data or you can move the Program Units to a PL/SQL Library (.pll) and attach the library to your smaller form where you can call the program units. Either option requires changes to the Larger form to enable it to process a record passed to the form as a parameter or to externalize the Forms Program Units to a library.
    Personaly, I would recommend you move the Program Units to a Library. This would enable you to use the processes in any form (that has the library attached).
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to use one Bex Variable for two purposes in one query?

    Hi,
    I want to prompt for a UOM in a query. Then I want to use that one UOM variable to do 2 tasks in the query:
    1. Perform a UOM conversion on one restricted key figure (no filtering)
    2. Filter in a second restricted key figure (no conversion)
    How would I use a variable (or two?) to do this? I do not want to have 2 UOM prompts.
    Thanks!
    Gregg

    Oh, it all seems so easy now!  Hindsight 20-20...
    Solution was to create a new input ready variable for Unit.
    1. Restrict the key figures which need restricting using new variable
    2. For conversions, in BI backend us T-code RSUOM and create new conversion type associated with new variable. Then for each key figure needing conversion, set the conversion parameter to use the new conversion type.
    Between both 1 & 2 above, the same variable is used & thus prompted only once.
    Solution works perfectly.... as it should. Hope this helps someone else!

  • How can I set up a wi-fi network, using one time capsule and two airport express

    how can I set up a wi-fi network, using one time capsule and two airport express ?
    The time capsule is near the Mac. ok
    The first Airport is on the corridor, ok, works well and the App on the iPad signals so, ok
    But when I plug the next Airport on another room nearby nothing happens, and signals disconected ....
    is the signal so weak that is not able to go to ono room to the other ?

    Well, even if you have the first express set up to extend the network, the second express can only extend from the TimeCapsule.
    Maybe you got walls of sheetrook in the way, or kitchen/bathroom tiles, etc, dampening the signal rapidly.

  • How to update two tables in a single call using JDBC Sender adapter

    Hello All,
    The scenario is, database entries have to be selected from two tables and at the same time those tables have to be udpated with the flag.
    We are using JDBC sender adapter and in Select Query, we are fetching the data by joinin the two tables.
    Update Statemtent: We can only update one table using this statement.
    Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Let me know.
    Regards,
    Sreenivas.

    Hi Sreenivas,
    > Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Yes its possible through join statement
    Check this links
    Update in JDBC Sender adapter for more than one table
    data from 2 tables for jdbc sender adapter
    Regards
    Ramesh

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

  • Using one Itunes database across two macs

    Using one itunes database across two macs
    I currently run a 2010 MBP (500gb hd) at home and on the road and a 2013 Imac (1Tb hd) at work. I have a large lossless itunes library of about 300gb and would like to increase the library further.
    My MBP started running slowly and I realised that my iTunes library was choking the whole computer. I started to explore ways to store my library on a remote disk and bought a G drive 1Tb portable drive.
    My efforts to carry out the transfer were only partially successful with most of my library transferring but a significant number of tracks displaying the ! sign which means they couldn't be located.
    I have also got an Imac at work and what I had hoped to achieve was to have my iTunes database on the 1tb portable drive and use the portable disk on both my MBP and iMac.
    Our technical support company are dubious about whether this will work because the local specific itunes library data on each machine will differ and each machine will not operate correctly with the underlying data on the portable drive.
    I am not very technical and I am finding it difficult to follow the various posts on this board and elsewhere. Many seem to comment on splitting their library across multiple disks but I cant really seem to get to the bottom of storing my library on one disk and using it across multiple computers.
    Is what I am trying to achieve practical?
    If it is, can someone point me to an article/post please? Or alternatively could someone explain how I might achieve my goal.
    Thanks in a advance for your help.

    Here you go.
    http://lifehacker.com/software/itunes/ultranewb--how-to-move-your-itunes-library -to-an-external-drive-238296.php

  • Can I use one phone number on two iphones with two apple ids?

    My carrier allows multiple sim cards with the same phone number for usage on different devices. I would like to use a second sim card for my phone number on a second iphone, but with a different apple id.
    Is it possible to use one phone number on two iphones with separate apple ids? How does this affect facetime/imessage?
    I can only find answers to using the same apple id on multiple devices. This works fine, but is not what I want to do here.

    You may be able to change the suspicious account activity message alerts
    in your Gmail settings, and check that side of it, since I can use several
    means of accessing my Gmail and Google Accounts; and in the past had
    shared an account (not google) with another party half a world away when
    her email server went down for a month.
    The Mail software should not know the difference, unless the setup in there
    is not correct; if this is so, then more than what she says would be wrong.
    The Google mail Support help site pages should cover this adequately.
    Gmail Help - Google Help
    https://support.google.com/mail/?hl=en

  • Can I use one iCloud account for two phones without sharing contacts

    Can I use one iCloud account for two phones without sharing contacts

    If so how do I unmerge the two phones?

  • Is it ok to use one apple id for two devices ?

    is it ok to use one apple id for two devices ?

    Here's the deal: The SLA permits the "sharing" of content with up to 5 family members in the same household. Any other distribution of content is considered stealing...the SLA does not give you the right to distribute content in any way, shape or form. Its really that simple, and "friend" is NOT a family member living in the same household.

Maybe you are looking for

  • Fill in and save when it says you can't

    I am applying for jobs and most have PDF applications. Some let you fill them in and save so you can attach to an email. Others do not let you save so I cannot fill in and email but their websites says that's what they want me to do. Do I have to dow

  • Exchange upgraded a month ago, slight increase in ...

    My local exhange was upgraded to ADSL2+ about a month to six weeks ago. Before the upgrade I was getting 7.5Meg from my old ADSL connection, I am quite close to the exchange. Anway, now my homehub3 reckons its connecting at 20.25Meg to the cabinet bu

  • Production Version of Material PO

    I have been asked to add Production version of each material Field in my Purchase order QTY report. Which table i can find production version of material for each purchasing Document number

  • Can't install Cinnamon from the AUR

    I can't install the latest CInnamon from the AUR on either my desktop PC (xorg-server 1.12, catalyst 12.6) or my laptop (xf86-video-intel, every single package up to date). I get the following error on both computers: $ makepkg -csi make[3]: Entering

  • Newb question - table total coming out double

    Hi, I'm a newb to BI Publisher, and running in to an issue I can't figure out. I'm trying to output a table that shows # of hours worked by employee for a given month, along with their department, etc. The table part comes out perfectly - works just