One form, multiple rows in db on submit - InfoPath Dev
in

InfoPath Dev

One form, multiple rows in db on submit

Last post 09-15-2009 07:39 AM by heath3106. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-11-2009 07:00 AM

    One form, multiple rows in db on submit

    I have created a form with a basic info section at the top followed by a repeating section underneath. The user can submit change requests on the form. The repeating section is for change request detail. they can add another repeating section so that they can report more than one change on a single form.

     In the database I have 2 tables. The first is the main table housing the data from the basic info section. The second would house the detail from each repeating change section. The tables are tied together on the IP form by formID which is autonumber in the main table in the db. My problem is that when the submit button is pressed, only one row is created in the change table. I need each repeating section to create a separate row in the change table but have the same formID as the basic data row in the main table. The formID field is the primary key in the main table but just another data element in the change table. Ideas????

  • 09-13-2009 06:57 AM In reply to

    Re: One form, multiple rows in db on submit

    It sounds from your description like you have your data connection set up correctly. If you walk through your main data connection again, have you set the main table to not be repeating?

    Hilary Stoupa

  • 09-14-2009 05:36 AM In reply to

    Re: One form, multiple rows in db on submit

    I can't see where to set the main table to repeating or not repeating, unless it's done by right clicking on the group in the task pane. It's set as a repeating in the group properties.

  • 09-14-2009 08:07 AM In reply to

    Re: One form, multiple rows in db on submit

    That is actually something you set up in the data connection -- in the wizard. So you could go to Manage Data Connections (bottom of the data source task pane), select your main connection and select Modify. When you get to the dialog with the data tree showing your table, select your main table in the tree, then click Modify Table. At the bottom of THAT dialog should be a check box next to some text about multiple records....deselect that.

    Hilary Stoupa

  • 09-14-2009 08:25 AM In reply to

    Re: One form, multiple rows in db on submit

    Made the change and the form is only submitting the last repeating section to the change table. The first repeating section is ignored.

  • 09-14-2009 05:11 PM In reply to

    Re: One form, multiple rows in db on submit

    You don't have the form ID set as the primary key for the child table, do you? Wait, I re-read your post, and you say you don't. You do have an ID column on the child table though, is that correct? I'm sorry, it really sounds like you have things set up correctly, so I'm a bit perplexed at what else to suggest.

    Hilary Stoupa

  • 09-15-2009 07:39 AM In reply to

    Re: One form, multiple rows in db on submit

    I think I have a solution. I'm going to create an 'update' button on the form that will submit the rows to the change table and then also add a new repeating section.The button will then change to an 'update' only button. Now....if I just knew enough about Jscript to write the onClick event to add the repeating section......

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.