Many to One (error), One to Many - InfoPath Dev
in

InfoPath Dev

Many to One (error), One to Many

Last post 02-22-2008 09:48 AM by bharvey. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-21-2008 08:29 PM

    Many to One (error), One to Many

    I have a form with an "asset" that can have multiple "components".  Thus, I have a repeating section for components.

    I want this to dump into a database. Similar to having an invoice with multiple items purchased.

    When I did the form creation, I selected and Access database.  One table is the main table  "assets" with ID set as the primary key.  I added in another table "components" which has an ID set as the primary key.  The components table has a field "asset_id".   I created the relation on the form connecting  Components.asset_id=Assets.ID    When I try to create the submission data connection, it says I have a Many to One relationship!  (instead of a One to Many).    I've created many Mysql Databases in my time.  Never had a problem doing joins.  I've done some in MSSql and never had a problem.  

     

    Why would infopath think it's a "many to one" vs  "one to many"?

     

    Thanks! 

     


     

    Filed under:
  • 02-21-2008 10:30 PM In reply to

    Re: Many to One (error), One to Many

    It sounds like you have done everything right. I wqould check it again and make sure.

    In the data connection you would select the asset table and use the add button to add the component table. 

    Make sure you have at least one record in each table. Infopath needs a sample value.

  • 02-22-2008 09:48 AM In reply to

    Re: Many to One (error), One to Many

    wow - thanks!  I never would have thought it would require sample data!

    Doing that seems to have worked!    Seems like they should come up with a better message than saying a many-to-one relationship exists when there is no data for it to understand.

     

    Can data be submitted to both the sql database and sharepoint list?  There are a few fields on information we'd like to submit to a sharepoint list as well as the sql database. Not all, just a few.

     

    Thanks!
     

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