Preform pricing total from SharePoint list - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Preform pricing total from SharePoint list

Last post 07-27-2017 11:08 AM by lwenzel90. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-26-2017 11:57 AM

    Preform pricing total from SharePoint list

    I have an infopath form that pulls data from a SharePoint list for the cost of food items. The form also pulls a quantity field where all items start as zero and that a user can change with a text box later on the form. The items and prices are then displayed in infopath using a repeating section with calculated fields. When I try to create an expression to find a total all of the quantities and their respective prices the expressions is valid but does not update for any value except the first item of the SharePoint list. I am lost and not sure how to calculate a total value. Any help you kind people could offer would be very appreciated.
  • 07-26-2017 12:03 PM In reply to

    Re: Preform pricing total from SharePoint list

    Here is the calculated field math I tried. If you would like me to explain anything further or screenshot anything else I would be happy to!
  • 07-26-2017 04:58 PM In reply to

    Re: Preform pricing total from SharePoint list

    You will need to use the eval function - if you look back at that sample form, you'll see it as a default in the Total field. Something like: sum(eval(group2, "my:Amount * my:Price"))

    You use the field picker to select the repeating group, then hand type the XPath for the other two fields - attach a copy of your form if you need a hand. :) 

    Hilary Stoupa

  • 07-27-2017 05:30 AM In reply to

    Re: Preform pricing total from SharePoint list

    I tried using the sum and eval function but I received this error maybe I am not taking the proper steps. This is the error that I receive: // ggyt is the price from the SP list // tpch is the quantity from the SP list INPUT: sum(eval(SharePointListItem_RW, "gqyt * tpch")) ERROR: Expected value type: , Actual value: name sum(eval(xdXDocument:GetDOM("FloorStockData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW, "xdXDocument:GetDOM("-->FloorStockData
  • 07-27-2017 10:55 AM In reply to

    Re: Preform pricing total from SharePoint list

    Paste this in to your FinalTotals default value: sum(xdMath:Eval(xdXDocument:GetDOM("FloorStockData")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW, "d:gqyt * d:tpch"))
    Hilary Stoupa

  • 07-27-2017 11:08 AM In reply to

    Re: Preform pricing total from SharePoint list

    Thank you so much you are awesome Hilary!
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.