XPath Unsupported Expression summing expression - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

XPath Unsupported Expression summing expression

Last post 07-19-2017 11:36 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-19-2017 08:19 AM

    XPath Unsupported Expression summing expression

    I am making a form for a share point site at my company that contains many text boxes that let the user input the quantity of an item that they would like to order. I then need to take the quantity and price from every text box and calculate the total price. I am currently using a calculated field and XPath. When I try to upload the form, infopath shows an error about invalid XPath syntax, but when creating the xpath code the validation button says the code is valid. This method has worked for about 40 items in total but I think it breaks due to a character count possibly. I have 60+ items to sum together depending on the circumstances and I am not sure if XPath is the right method of finding a total price. I am new to infopath so I hesitate to code a custom solution but I will if I have to. Can this be done in XPath?
  • 07-19-2017 08:29 AM In reply to

    Re: XPath Unsupported Expression summing expression

    Also here is the error infopath throws when I try to publish my form.
  • 07-19-2017 10:53 AM In reply to

    Re: XPath Unsupported Expression summing expression

    I think the only way around this would be to use a different data structure. If you used a repeating structure, you could use the eval function to do the math. See attached sample, download it locally, right click and select design to open in design mode, then preview. I'm using default data & formatting rules to get the items onto the form when you preview it.
    Hilary Stoupa

  • 07-19-2017 11:16 AM In reply to

    Re: XPath Unsupported Expression summing expression

    Thank you so much Hilary for all you help I definitely see the usefulness of using the repeating section. I am not sure how to populate the table with data though. Did you use a XML file to do this?
  • 07-19-2017 11:36 AM In reply to

    Re: XPath Unsupported Expression summing expression

    Under the Default data tab in the ribbon you can add additional default rows and set values. :)
    Hilary Stoupa

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