Creating an outline numbering scheme???? - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Creating an outline numbering scheme????

Last post 03-26-2008 02:20 PM by Clay Fox. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-25-2008 01:13 PM

    Creating an outline numbering scheme????

    I have a situation where I need to created the following using nested repeating sections and/or tables:

    1.  Main Item One

    1.1  Sub Item One

    1.1.1 Sub Sub Item One

    1.1.2 Sub Sub Item Two

    1.2  Sub Item Two

    1.2.1 Sub Sub Item One

    2.  Main Item Two

    2.1  Sub Item One

    etc.

    I have no problem creating the numbering for the Main item level using an expression box with the value of concat(position(), "."). As soon as I step into the a sub level I have no way of referencing the level above. I have attempted to replace the expression box with a text field using the same position function as the default value but it always returns a value of one no matter how many rows are added. I have not been able to find any examples of this here or anywhere else. As the position() function does not allow for the passing of a value so that it would work as followings: concat(position(..), ".", position(.), "."), I am at a lost.

    When suggesting a solution, please consider the following:

    • I would prefer being able to save the outline numbers with the xml data, hence I would like to avoid using the expression box control if possible,
    • I am using InfoPath 2007, and
    • Visual Basic as the programming language.

     Any suggestions would be appriecated.

    Thanks in advance!

     

  • 03-25-2008 01:17 PM In reply to

    Re: Creating an outline numbering scheme????

    Welcome to the forum.  We need more PHDs around here. :)

    First, you probably should store this number scheme in your schema so I would move your formula to a field instead of an expression.

    Then do a search here on the current() function which should help you get the context you need and reference the parent rather than the first element.  Then you should be able to reference the parent's number and add the position() to get the child numbering the way you want.

  • 03-26-2008 08:10 AM In reply to

    Re: Creating an outline numbering scheme????

    Thanks for the prompt response!

    I have done as you suggested and searched for information on the current() function both on this website and others that support InfoPath. Either I am not as smart as I thought or I am searching for the wrong thing (I searched for "current()"). All I find is information about the current year and the current row of a repeating table. If I do find something on the current function it seems to be about using current as an XML function.

    Could you point me to the right thread, provide a actual example or help me with what you search for to find the topic needed?

    Thanks again.

  • 03-26-2008 02:20 PM In reply to

    Re: Creating an outline numbering scheme????

    The current row of the repeating table is what you need.

    That way when you have your repeating parent numbered and you want to then number the repeating child you can use the current() function to identify the parent and find what number to start with.

     

    So...

    Parent 2.0

        Child 2.1 (current parent number.row position())

     And so on.

    This could be used to nest as deep as you need,

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