Optional repeating fields in a repeating table? - InfoPath Dev
in

InfoPath Dev

Optional repeating fields in a repeating table?

Last post 12-07-2005 11:39 PM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-05-2005 10:18 AM

    Optional repeating fields in a repeating table?

    I know that InfoPath cannot support mixed content, but what of something like this as a row in a repeating table/section?:

    ((element-title | text | generated-number | style | graphic | generate-key-term-list | toc | chapter-number | position-in-chapter | section-number | division-number | subdivision-number)*)

    Assume for now that the content models for these are either EMPTY or PCDATA. Is there a way to get InfoPath to enforce this structure and help us to build a field value that will be something like below?

    <title><text>Exercise </text><chapter-number/><text>.</text><division-number/><text>.</text><subdivision-number/></title>

    My first take is that InfoPath wouldn't be able to do the optional repeating field thing in anything other than a repeating section, since the number of fields is not a.) fixed, or b.) even sequential.

    Can someone confirm my hunch that this can't be done, or start me down the path to figuring out how to support this content model?

    Thanks in advance for any direction here.

    -Jean K.
  • 12-05-2005 11:23 AM In reply to

    Re: Optional repeating fields in a repeating table?

    You are not forced into using InfoPath to generate your schema. You can create your own .xsd schema outside of InfoPath. Then you can either create the InfoPath form from the pre-defined schema or you can change an existing form's main source to use the schema you defined externally.
    Jason
    http://www.k2distillery.com/
  • 12-05-2005 09:32 PM In reply to

    Re: Optional repeating fields in a repeating table?

    Jason is right on. When my team created the samples that shipped with InfoPath V1 many of us used XML Spy. :)

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-06-2005 09:37 PM In reply to

    Re: Optional repeating fields in a repeating table?

    quote:
    Originally posted by Patrick Halstead

    Jason is right on. When my team created the samples that shipped with InfoPath V1 many of us used XML Spy. :)

    Patrick Halstead [InfoPath MVP]
    InfoPathDev



    Woops. Yep. I've been using XML Spy for schema development. Guess I need to make my question more specific.

    What types of controls would I use within a repeating section If I write a schema with an "entry" element that has the following content model?:

    ((element-title | text | generated-number | style | graphic | generate-key-term-list | toc | chapter-number | position-in-chapter | section-number | division-number | subdivision-number)*)

    Since the model is repetitive, optional, and does not require a specific sequence, would I have to create a series of optional repeatable sections within the entry repeatable section?

    How bad would this hit run-time throughput?

    Would I need to support the random/optional/repeatable with a combination of optional controls and behind the scenes script/managed code?

    Thanks in advance for responding. This forum is great!

    -Jean K.
  • 12-07-2005 11:39 PM In reply to

    Re: Optional repeating fields in a repeating table?

    Hi Jean,

    Good to have you back! I hope you are feeling better. :)

    I don't think this will affect run-time perf very badly. The XSL apply algorithm is impacted by number of controls in page, size of dropdowns, etc. Note: there is a good article on perf on the MSDN website.

    I don't think you'd need behind-the-scenes script or managed code to handle the schema. Of course, you could add code later to provide business logic.

    Thanks for the comments. We look forward to serving you!


    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.