Populate Main from Secondary on Open - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Populate Main from Secondary on Open

Last post 09-24-2004 05:44 AM by oakridge. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-21-2004 02:09 PM

    Populate Main from Secondary on Open

    I am trying to populate the form from a secondary data source on open then submit that data along with other entries into the main database.

    I am working with a bill of materials. There are parent and child components. I have the parent in a repeating section with the child elements in a repeating table within that table. There should be multiple entries for the child elements per parent. I can only get the form to bring up the first parent and first component. Any ideas how to do this without scripting?

    Thanks.
  • 09-21-2004 05:15 PM In reply to

    Re: Populate Main from Secondary on Open

    Without scripting you'll need to use the Open Rules. But this can be tedious if there are numerous fields.

    The best thing to do is to have the main data source (or at least a subsection of it) identical to the schema of the secondary data source. Then you can use script to just do a clone of the secondary data source, and then do a replaceChild into the main data source.

    Greg Collins [InfoPath MVP]
  • 09-22-2004 06:00 AM In reply to

    Re: Populate Main from Secondary on Open

    I am working with the rules method, but am only getting the first parent item and child item even though they are in a repeating section. Why does the form not retrieve all of the parent items instead of just the first one?
  • 09-23-2004 11:27 AM In reply to

    Re: Populate Main from Secondary on Open

    At this point I will need you to provide more information about the forms and your intentions. I'll need this in order to understand what you are attempting to do and what is actually happening.

    Greg Collins [InfoPath MVP]
  • 09-24-2004 05:44 AM In reply to

    Re: Populate Main from Secondary on Open

    Thanks for your time.

    I am using InfoPath to retrieve and submit data to a SQL 2000 database.

    I have a main database connection that is connected to three tables. There is a one to many relationship between the tables.

    Machine Type to Parent Item
    Parent Item to Component Item

    I have a Secondary Data Source that contains these fields in them
    Machine Type, Parent Item, Component Item.

    I am hoping for one of these two options.
    1. On Open, populate the three fields above. Machine Type would be imported into a field called Item No in the first table in the Main database and displayed on the form.
    Parent Item would be populated in a repeating section
    Component Item would be populated within the same repeating section in a repeating table.

    2. The other option is to have the information displayed as the Machine Type is selected from a dropdown.

    The look would be as below
    Item No.

    Repeating Section: Parent
    Within the Repeating Section a Repeating Table
    Comp
    Comp
    Comp

    Parent Item: 1234
    Component: 3456
    Component: 432
    Component: 678

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