capturing data from secondary datasource - InfoPath Dev
in

InfoPath Dev

capturing data from secondary datasource

Last post 11-22-2005 05:12 AM by vt_asparagus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-21-2005 12:30 PM

    capturing data from secondary datasource

    Greetings once again,

    Please forgive all my questions as I climb the learning curve. Here's my latest question:

    I have a list of items that the user needs to select from. The user needs to be able to select more than one item. I'm getting the list of items from a secondary datasource (an xml doc).

    Here's what the secondary datasource looks like:

    <group name="firstGroup" entireGroupSelected="false">
    <subgroup name="subGroupA" selected="false"/>
    <subgroup name="subGroupB" selected="false"/>
    </group1>

    ...and groups and subgroups can repeat


    I've set this up as a list of checkbox's. The checkbox is linked to the "selected" attribute.

    The element group is connected to a repeating section and the element subgroup is connected to a repeating section nested within that one.

    The question is, how do I capture the user's selections into main datasource. I cant put any fields from my main datasource into the repeating table because Infopath doesnt allow that.

    Currently, my only idea is to programatically get a handle on the secondary datasource's object model through the getDOM() method and then dump its xml into an empty element in my main datasource. But this seems really messy.

    Any better ideas?
  • 11-22-2005 05:12 AM In reply to

    Re: capturing data from secondary datasource

    Agreed, dumping the entire secondary datasource's xml into a single element within your main datasource would not be best. I think you are on the right path but just need to tweek it. In your main data source add a repeating group(s) that match the schema of your secondary datasource. Then as items are checked in your secondary datasource repeating group, move the data into your main datasource.
    Jason
    http://www.k2distillery.com/
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.