Solved - Recursive Doc / Title / Text Form - InfoPath Dev
in

InfoPath Dev

Solved - Recursive Doc / Title / Text Form

Last post 02-15-2005 07:37 AM by Greg Collins. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-11-2005 04:35 AM

    • aqx
    • Not Ranked
    • Joined on 02-11-2005
    • France
    • Posts 3

    Solved - Recursive Doc / Title / Text Form

    Hi everybody, I'm newcommer here ...


    I'm trying to create an InfoPath form to enable editing kind of a document ...

    The root element is called "Module", it can be composed of any number (0 to n) of "Chapter".

    The "Chapter" is the second level element, it can be composed of any number of "Chapter" (first level of recursion) and any number of "Requirement", with no specific order.

    The "Requirement" is the third level element, it can be composed of any number of "Requirement" (second level of recursion).

    (I don't see a way to attach a file here, I may paste the xsd schema if needed to make it clearer ?).


    When I create an InfoPath form from this schema to edit the data, I can see a "recursive section" created for the "Chapter", but the "Requirement" does no show as a recursive section :-(

    Using this form, I am able to create lists of chapters with différent levels as needed ...

    I am also able to insert lists of "Requirement" in a "Chapter", but it's impossible to create a "Requirement" *in* a "Requirement".


    Any clue on how to do that ?


    Regards,

    AQX
  • 02-11-2005 12:41 PM In reply to

    Re: Solved - Recursive Doc / Title / Text Form

    Does your schema have Requirement defined as being a child of Requirement?

    Greg Collins [InfoPath MVP]
  • 02-14-2005 01:27 AM In reply to

    • aqx
    • Not Ranked
    • Joined on 02-11-2005
    • France
    • Posts 3

    Re: Solved - Recursive Doc / Title / Text Form

    Yes, it does. See for yourself ;-)

    Regards,

    AQX

    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 sp1 U http://www.xmlspy.com) by DDS (DDS) -->
    <xs:schema xmlns="http://ds.com/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ds.com/namespace" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="Module">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence minOccurs="0">
    <xs:element ref="Chapter" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="ModuleName" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="Chapter">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:choice minOccurs="0">
    <xs:element ref="Chapter" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element ref="Requirement" minOccurs="0" maxOccurs="unbounded"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="ChapterName"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="Requirement">
    <xs:complexType>
    <xs:sequence minOccurs="0">
    <xs:element ref="Requirement" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="RequName"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
  • 02-15-2005 04:44 AM In reply to

    • aqx
    • Not Ranked
    • Joined on 02-11-2005
    • France
    • Posts 3

    Re: Solved - Recursive Doc / Title / Text Form

    So I was given the solution ...

    The first problem was when I dragged the datasource on the form, a recursive section was created for the first level of recursion. I was expecting the same for the second level of recursion ...

    Actually, I need to create the second recursive section myself.

    Second problem, when trying to create this recursive section, I was unable to bind it to my recursive element, until I tried to bind it to the *second level* element.


    That seems to make the job.

    AQX
  • 02-15-2005 07:37 AM In reply to

    Re: Solved - Recursive Doc / Title / Text Form

    Great! Glad you got it working!

    Greg Collins [InfoPath MVP]
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.