Repeating Section Across Multiple Views - InfoPath Dev
in

InfoPath Dev

Repeating Section Across Multiple Views

Last post 02-29-2012 08:22 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-21-2012 08:01 AM

    Repeating Section Across Multiple Views

    In the XML Data Source, I have a node that can have multiple entries.  In this case I would normally use a Repeating Section on the InfoPath form.  There will ever be 0 to 3 entries for the node.

    Is it possible to create 3 separate views, each which populate one entry of the node in question.  Or am I going to need a Repeating Section to handle the multiple entries.

    Can a Repeating Section be split across multiple views dynamically?

     

  • 02-29-2012 08:22 PM In reply to

    Re: Repeating Section Across Multiple Views

    Hi Wheeliea,

    One simple way to do this is to add an receive data connection to an XML file that has three fields in it:

    <viewState>

        <field1></field1>

        <field2></field2>

        <field3></field3>

    </viewState>

    Drag the secondary data source values to each view - one for field1, one for field2 and one for field3.

    Add a rule to each field to set a value. Specify the value of the repeating node in your main data source.

    This doesn't quite work since you aren't indexing it.

    You'll have to go into the manifest.xsf (File->Publish->Export Source Files) using notepad and add the [1] or [2] or [3] index after the xpath for each of the three rules.

    Then it will work.

    Of course, it's slightly more complicated if you have a lot of fields in the repeating child group, but you can do it.

    Make sure your main data source looks like this:

    parent (non-repeating group)

        child (repeating group)

             fieldA (non-repeating)

             fieldB (non-repeating)

            ...

    Good luck   

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.