Expression Box vs. Text Box - InfoPath Dev
in

InfoPath Dev

Expression Box vs. Text Box

Last post 05-08-2008 04:50 PM by Greg Collins. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-08-2008 08:30 AM

    Expression Box vs. Text Box

    Hello,

    I'm trying to get the order total and using an XPath as an example from the InfoPath Team Blog in an Expression Box:

     

    sum(xdMath:Eval(my:lineItems, "my:Price * my:Quantity"))

    However, I would like to have the order total presented in a column in our SharePoint library. I'm trying to create the same XPath in a Text Box, but am running into problems. Here is my XPath for the text box:

    sum(eval(lineItems, "../my:lineItems/my:Quantity * ../my:lineItems/my:Price"))

     

    But this results in a incorrect total - the Total keeps increasing by whatever is on line number one in the form.

    How can I "promote" the order total from the form, not using an Expression Box?

    Thanks,

    Brian
     

     

  • 05-08-2008 04:50 PM In reply to

    Re: Expression Box vs. Text Box

    Your eval has a problem, look at the XPaths:

    (lineItems, "../my:lineItems/my:Quantity * ../my:lineItems/my:Price")

    lineItems is the starting point, yet your multiplication XPaths step up above that node ("../") and then come back into it to always get the first row.

    It should look more like:

    (lineItems, "my:Quantity * my:Price")

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