Calculating Totals - InfoPath Dev
in

InfoPath Dev

Calculating Totals

Last post 01-18-2006 09:46 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-18-2006 09:30 AM

    • Flurry
    • Not Ranked
    • Joined on 01-03-2006
    • Posts 3

    Calculating Totals

    Hi Guys

    I have two tables. The master table has a value. Let's call it v1. The detail table has a value called v2. What I want is to display v1 - sum(v2) on an infopath form. What I have done is created an expression box to sum v2. However, there seems to be no way of referenceing this result in another expression box.

    When I try the obvious of v1-sum(v2) in the expression box I get the following error.."Node Test Expected"

    Is there anyway of doing this?
  • 01-18-2006 09:46 AM In reply to

    The reason you are getting the Node Test Expected error is because you need to specify which v1 you are trying to reference. Since the table is repeating you have several v2s (hence the sum(v2)) and several v1s. If the expression box is inside the repeating table row you should be able to use the function button on the expression box and Insert Field or Group to get this to work.

    If the expression box is not in the repeating table you will need to use XPath with a node test to determine which v1 you are trying to subtract from. The XPath might look something like this:

    /my:myFields/my:group1/my:group2[my:v1 = 4]/my:v1

    To edit the XPath manually in the expression box be sure to check the box labeled "Edit XPath".

    I hope this helps, let us know if you have any more problems!

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.