trouble submitting info from both a table and a repeating table - InfoPath Dev
in

InfoPath Dev

trouble submitting info from both a table and a repeating table

Last post 07-11-2012 01:22 PM by surly0k. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-11-2012 10:04 AM

    trouble submitting info from both a table and a repeating table

    This is the problem I have. I have a form. The form has 2 tables. The first table isn't repeating, and sets values related to a project (Region, Project Name, Manager Responsible). Then under that, there is a repeating table, that sets values for people related to those projects (Name, Salary, ID, Start Date, etc). Because of user requirements, it must be submitted to one table in my database (SQL Server, and yes you may be thinking there should be 2 tables, but these people won't get off their unicorn and come down to reality). So if I only have one row in the repeating table, the project data carries into the row in my database table (Sweet!) but when I have more than one row in the repeating table, it won't carry the project data to the second row in the database. Do I need to use C#? Have I missed some all important check box in some properties window?

  • 07-11-2012 10:12 AM In reply to

    Re: trouble submitting info from both a table and a repeating table

    Give your unicorns a SQL view that shows the data as if it is in one table.

    Can you attach a screen shot that shows your form schema under the options tab? I'm guessing this is a database bound form? Bound to the one table? And your table control that doesn't repeat is actually using fields from the repeating table...

    Hilary Stoupa

  • 07-11-2012 10:29 AM In reply to

    Re: trouble submitting info from both a table and a repeating table

    The issue started when they wanted one form to manage both project data and people data, and as you can't submit to 2 tables, I just decided to take this approach. Also the guy in charge of me told me I should do it this way. It is a database bound form, bound to one table in my db.  I can't do a picture, but I can map it our for you, I'll remove some fields just to simplify.

    Project Data (Table)

    Region and Project Name

    People Data (Repeating Table)

    Name and Salary

     

    With one row of repeating data it looks like this in my database:

    Region             Project Name           Name               Salary

    NAM                Project 1                  John Smith       $5000

     

    With one row of repeating data it looks like this in my database:

    Region             Project Name           Name               Salary

    NAM                Project 1                  John Smith       $5000

    NULL                NULL                       Jane Smith       $5500

     

     Hope this makes sense, let me know if you need any additional info. Thank you SO much for your time and help!

  • 07-11-2012 11:47 AM In reply to

    Re: trouble submitting info from both a table and a repeating table

    So, your form is bound to a single table - what does this mean:

    Project Data (Table)

    Region and Project Name

    People Data (Repeating Table)

    Name and Salary

    If the form is bound to a single table - when you mention these two separate tables, are you just talking about form controls?

    The thing is, if your form is bound to a single table, you'll have multiple instances of the Region field. If you have that field bound to a non-repeating control you'll only be populating the first instance, I think. You may want to use a default value to set the other instances.

    Hilary Stoupa

  • 07-11-2012 01:22 PM In reply to

    Re: trouble submitting info from both a table and a repeating table

    The table and repeating tables are form controls, apologies for the lingo mixup.

    What you are saying makes sense. I don't want to use a repeating control, as I only want them to be able to enter one region.

    I've been messing around with the default values by double clicking the repeating table, then edit default values, but am seeming to have issues. @Region[. = current()] is what I have in there for region, but it's still not pulling through to the next line when I submit to my DB. Is this the correct path to go down?

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