Repeating Tables - InfoPath Dev
in

InfoPath Dev

Repeating Tables

Last post 08-25-2006 10:20 AM by Greg Collins. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-22-2006 08:19 AM

    Repeating Tables

    When you put a footer on a repeating table, how do you change the fields below into repeating boxes (it's connected to a database). I want it similar to this style:

    http://i6.photobucket.com/albums/y214/blindfire123/infopath.jpg

  • 08-22-2006 10:05 AM In reply to

    Actually, ignore that. How do you add all the numbers up in a column when you use a repeating table? I've tried using this forumla but it doesn't work:

    sum(@Total_Cost)
  • 08-22-2006 04:08 PM In reply to

    Make sure your XPath is correct and that you are using the appropriate namespaces (if required). You need to know where your starting point is for your XPath...

    For example your could need to write:

    sum(../my:RepeatingNode/@my:Total_Cost)

    or

    sum(SomeNode/@Total_Cost)

    etc.
  • 08-23-2006 08:25 AM In reply to

    Sorry, I'm very new to Infopath, I only started it last week. Could you possibly explain it a little better, possibly in steps?

    Here's a screenshot of what it currently looks like(it looks pretty messy at the moment but it's just in draft form):

    http://i6.photobucket.com/albums/y214/blindfire123/Infopath2.jpg

    I want every number in the column with "Total with Tax" to be added up in the "Total" text box.

  • 08-23-2006 09:36 AM In reply to

    The visual is helpful -- I'm assuming it is the second (bottom) repeating table. But what I really need to see is the data source tree for that table to have an idea how the nodes are organized before I can know how to help.
  • 08-23-2006 10:47 AM In reply to

    Yes, it's the bottom repeating table. Is this what you're after:

    http://i6.photobucket.com/albums/y214/blindfire123/datasource1.jpg

    http://i6.photobucket.com/albums/y214/blindfire123/datasource2.jpg
  • 08-25-2006 10:20 AM In reply to

    So it looks like (from your 2nd screenshot) is that you want to get the sum of "Total With VAT" fields and place it in "Total" field. Is this correct?

    What I don't understand from the data source images compared with your second screen shot is whether your "Total" field is ALSO inside the repeating "d:SIRF_table" node.... if it is, it doesn't make sense to have it there... becase the grand total would be repeated when it only need be calculated and stored once.

    Outside that... it looks like your formula should be:

    sum(d:SIRF_table/@Total), but again, I can't be sure from just the visuals...

    Here's the steps to do:
    1. Right-click the "Total" field and choose Properties.
    2. Click the "fx" button to the right of the Value field.
    3. Click Insert Function, select "sum" and click OK.
    4. Double-click the underlined 'insert field' text inside the sum function.
    5. Choose the correct data source and select the d:SIRF_table/@Table field, and click OK 3 times.

    Preview -- the "Total" field should now be summing up the row totals.
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.