How to format a repeating table or section - InfoPath Dev
in

InfoPath Dev

How to format a repeating table or section

Last post 08-20-2014 01:59 PM by rcl0404. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-18-2014 06:53 AM

    • rcl0404
    • Top 500 Contributor
    • Joined on 07-15-2014
    • Arlington, VA, USA
    • Posts 29

    How to format a repeating table or section

    I have a list in infopath populatiing from an iShare list (where "-" is a column change, each item has 4 columns, a name column and 3 attributes) which exists in this format:

    "Item1name-Item1Attribute1-Item1Attribute2-Item1Attribute3-Item2name-Item2Attribute1-Item2Attribute2-Item2Attribute3"

    and so on up to 30 items and their 3 attributes (120 columns)

    How can I make infopath take this long row, and transform it to do this:

    "Item1name-Item1Attribute1-Item1Attribute2-Item1Attribute3

    Item2name-Item2Attribute1-Item2Attribute2-Item2Attribute3"

    Basically every 4 columns (every item change) I want it to make a new row rather than continue on one giant row. The list contains many item sets, which is why I dont simply structure the iShare list this way. My infopath list only takes one set of items.

    thanks

  • 08-20-2014 01:15 AM In reply to

    Re: How to format a repeating table or section

    Hi rcl0404,

    It seems like you may need to use a series of substring functions. Please check the link below for a more detailed guide:

    http://www.w3.org/TR/xpath/#function-substring-before

    I'm also attaching a sample form you may use as your reference (download xsn > right click > open in design mode). Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 08-20-2014 06:50 AM In reply to

    • rcl0404
    • Top 500 Contributor
    • Joined on 07-15-2014
    • Arlington, VA, USA
    • Posts 29

    Re: How to format a repeating table or section

    Cant open it, I'm running infopath 2010 and it says yours is too new. Could you explain how to use the substring command to do this? i think I get where you are going with it but I am not familar with the syntax with fields

     I might need to re-explain my list again, my earlier example is a bit cluttered, the items are not associated with their attributes virtually/technically, just logically. The way the infopath form presents them will imply this, but heres what im talking about:

    iShare List Format:

    ItemSet-Item1-color1-size1-quantity1-item2-color2-size2-quantity2-Item3-color3-size3-quantity3

    2 Example item sets:

    tire kit   -tire-black-medium-4-tire iron-silver-small-1-lug nut-silver-tiny-30

    paint kit-brush-brown-small-1-roller-white-small-1-paint-green-medium-1

    So each item and attributes are seen as their own category, I want the infopath form to show one item set(got that part down) and to take the big row and break it down into a 4X30 table, (got this down too by manually dragging fields into a table) BUT i want it to not show the blank rows. Basic logic being- IF item "any number" is blank THEN hide row". But, since it was me who arbitrarily changed up the ordering, the program wont know the difference from one row ot another, even if I succcessfully hide the field the empty row will still be there, defeating the purpose.

  • 08-20-2014 07:07 AM In reply to

    Re: How to format a repeating table or section

    Apologies for that. I'm attaching a 2010 version of the form. Basically, I used a combination of substring-before and substring-after functions. To get the first string before the first dash (-), I used substring-before(field1, "-"). Then, using that formula, I used substring-before(substring-after(substring-before(field1, "-"), "-"), "-") to get the second string after the first dash, then proceed to the next string until you've reached your desired value. I'm not sure if this is the exact formula I used, but the logic should be similar.

    The second portion of the was easier since you already have the first section done. You can just user substring-after(field1, ThenPasteTheFirstFormulaHere). This should return everything after the first formula. I hope this makes sense.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 08-20-2014 07:40 AM In reply to

    • rcl0404
    • Top 500 Contributor
    • Joined on 07-15-2014
    • Arlington, VA, USA
    • Posts 29

    Re: How to format a repeating table or section

    well thats how the ishare list is structured, the "-" represent column changes, there are no actual "-" in the list

    The first column is the item set name, the second column is item 1 name, third column item1's color...5th column item 2 name, 6th column item2's color...ect

    I realize I can put a rule on each field but that seems sloppy, and doesnt solve the empty table rows issue

    I realize its being picky, do appreciate the response

  • 08-20-2014 01:59 PM In reply to

    • rcl0404
    • Top 500 Contributor
    • Joined on 07-15-2014
    • Arlington, VA, USA
    • Posts 29

    Re: How to format a repeating table or section

    Got new instructions and was able to restructure the list, thankfully.

    Appreciate the interest though

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