Issue on Repeating table summation - InfoPath Dev
in

InfoPath Dev

Issue on Repeating table summation

Last post 09-09-2013 04:51 AM by Richter Belmont. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-05-2013 02:47 AM

    Issue on Repeating table summation

    Hi Guys - I want to share my problem here hoping that someone can help me resolving :)

    Im doing a sum in a repeating table, sum all "hours" and "amount" that are same WONum field. However, the hidden rows with the same WONum is also adding up, can someone knows how to prevent those hidden row from summing up? Thanks.

    WO60001 = should be 3.5hrs only
    WO60002 = should be 9hrs only
    WO60007 = should be 0.5hrs only



    here is the code i put..

    sum(/my:myFields/my:LaborReport/my:_Hours[../my:_WONum = current()/../my:_WONum])
    Filed under:
  • 09-06-2013 02:27 PM In reply to

    Re: Issue on Repeating table summation

     Hi - you need to add to the XPath the filter you are using to hide some rows.

    sum(/my:myFields/my:LaborReport/my:_Hours[../my:_WONum = current()/../my:_WONum and ../my:SomeField != "SomeValue"])

    I don't know what you are filtering on, so the XPath and value in bold above are made up - but that is the general idea.

    Hilary Stoupa

  • 09-09-2013 01:13 AM In reply to

    Re: Issue on Repeating table summation

    Thanks Hilary It Works!

    sum(/my:myFields/my:LaborReport/my:_Hours[../my:_WONum = current()/../my:_WONum and msxsl:string-compare(../my:_Date, ../../my:SummaryReport/my:LR_StartDt) >= 0 and msxsl:string-compare(../my:_Date, ../../my:SummaryReport/my:LR_EndDt)
  • 09-09-2013 04:51 AM In reply to

    Re: Issue on Repeating table summation

    Do you know how to filter the date thru code?

    xIter = MainDataSource.CreateNavigator().[Select]("/my:myFields/my:Group1/my:LaborReport[@_Date >=
    ../../my:SummaryReport/my:LR_StartDt and @_Date <=
    ../../my:SummaryReport/my:LR_EndDt]", NamespaceManager)

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