How do I create an alphabetized lists in a repeating section? - InfoPath Dev
in

InfoPath Dev

How do I create an alphabetized lists in a repeating section?

Last post 02-11-2015 01:11 PM by jack eagly. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 02-07-2015 10:06 AM

    How do I create an alphabetized lists in a repeating section?

    I've tried to use something similar to concat(count(preceding-sibling::*) + 1, ".") = 1. to create a repeating alpha char in a repeating section but have not had any success. When inserting an item I would like to see (a),(b),(c),(d),etc. Basically, alpha characters wrapped in parenthesis for each new row. Is this possible with a similar function? Thanks.
  • 02-09-2015 11:36 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Okay, I learned if I insert the fx control and use position() I can concat with parenthesis to get (1), (2), (3), etc.  So I'm half way there.  Now I need help figuring out how to increment a., b., c., etc. along with (a), (b), (c) and so on in two seperate repeating tables.  I've searched to the end of the internet but haven't found a good solution.  I can't be the only one that has ever needed to be able to do this. InfoPath 2007. 

    Thanks.

  • 02-09-2015 11:52 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    I'd use an XML file in the form as a secondary data source for this - see attached sample. Save the file locally, right click and select design to open in design mode.

    Hilary Stoupa

  • 02-09-2015 04:28 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Thanks for the response, I'd like to see your solution. I couldn't open it at work because policies won't let me open a form downloaded from the internet. I came home and tried it but cannot open it because your form was created with a newer version than mine. I vaguely remember using .xml to do something similar but its' been 7 or 8 years ago.
  • 02-09-2015 04:46 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    What version of IP are you using? 2007? I think the template I saved was 2010, I'm happy to change the compatibility setting and repost it. Be sure you are saving locally and right clicking to select Design to open in design mode....

    Hilary Stoupa

  • 02-10-2015 08:34 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    I'm using 2007. I've saved example forms before and have been able to open them with no issues, this is the first one.  I've done some searching and have come up with the following xml code and linked to a read only text box inside of a repeating table....
    <?xml version="1.0"?>
    <outline>
    <type>a.</type>
    <type>b.</type>
    <type>c.</type>
    </outline>
    but when I insert a new row into my table, all I get is a. b. .... for each new row rather than...
    a.
    b.
    c.
    d.
    etc.
    Thanks.
  • 02-10-2015 09:20 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Here's the sample again in IP 2007. In my sample XML I've got the numbers & letters then am using a filter to get the right one.

    Hilary Stoupa

  • 02-10-2015 02:32 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Thank you very much, I can see your solution.  I tried to recreate it using your fx but I can't just copy and past your formula.  So I after creating the link from InfoPath to .xml file, I selected and inserted the name type from Letters.xml and then Number but when I select the group from main data source, instead of group2 appearing I get .. with an underline and when I hit okay, I get the formula contains errors....

    preceding-sibling::-->..<--).

    After I get this to work I'll need to think about auto populating the second field based on each letter in the first field.

    Thanks.

  • 02-10-2015 02:39 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Attach your form to a reply under the Options tab & I'll give you a hand. What you'll need is the path to the group - usually it has to be manually entered in a more complex formula. :)

    Hilary Stoupa

  • 02-10-2015 06:15 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    It looks something like this. I tried again establishing the relationship of the groups 6 and 12 to their respective functions but I guess I don't understand the logic. Thank You.
  • 02-10-2015 06:26 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    In your calculated values you had the formula entered as text (but you may have done that to show me where you wanted things) - try this one. I fixed up the XPaths to point to the group the calculated value was in....

    Hilary Stoupa

  • 02-11-2015 06:24 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Thank you very much. I had built the formula using XPath and just moved it to text so you could see what I had done.  Can you provide the steps to inserting the formula, is it something like:

    Type concat(
    select insert Field or Group
    Select Name from secondary source
    enter [
    then click insert button again and select Number from secondary source
    insert function and select count and type in current()/preceding-sibling::
    then click insert button again and insert group6 close parenthesis +1,".")

    That's how I was  doing it but I could get group6 to populate.

    Thanks Again.

  • 02-11-2015 07:11 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Actually, that's the thing - I used the insert field or group button to select the field from the data source, then manually created the filter (the stuff in the square brackets) - which I know is not a lot of help when you are learning this stuff. :)

    Hilary Stoupa

  • 02-11-2015 11:52 AM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    so If I click fx, then type concat(

    Then Click Insert Field or Group and select secondary data source and field: Name and click ok

    Then Insert Field or Group and select Filter Data, Add, select Field or Group, secondary data source and field: Number

     Do I set that is equal to (or another parameter) Group6 or equal to Use formula and insert count(current()/preceding-sibling) +1?

     Please walk me through this so I can do it.

     Thanks.

  • 02-11-2015 12:04 PM In reply to

    Re: How do I create an alphabetized lists in a repeating section?

    Set it to Use formula and type in count(current()/preceding-sibling::my:group6) +1

    Replacing group6 with the correct XPath for your form's schema.

    Hilary Stoupa

Page 1 of 2 (16 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.