Xpath / formula to sum column values in a repeating table which are formatted as time (09:00) - InfoPath Dev
in

InfoPath Dev

Xpath / formula to sum column values in a repeating table which are formatted as time (09:00)

Last post 07-30-2012 11:35 AM by Mel Clemente. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-19-2012 07:07 AM

    Xpath / formula to sum column values in a repeating table which are formatted as time (09:00)

    Hello

    I've designed a time recording form on a web-browser template for InfoPath 2010.

    I have a repeating table with a column named time, in time format and a drop down list of length of time at half hourly increments (i.e. 00:30, 01:00, 01:30, etc)

    I would like to SUM these times up in a text box at the bottom of the form, however using the following formula 'NaN' is returned. I have tried changing the text box's formula to double decimal, time, number and text with no success.

    SUM(Time)          [Time is the field in my repeating table] 

    Any direction you could offer would be really helpful.

     

    Many thanks

    Sammy.

  • 07-30-2012 11:35 AM In reply to

    Re: Xpath / formula to sum column values in a repeating table which are formatted as time (09:00)

    InfoPath can only perform mathematical functions/calculations to fields of number type, e.g. integer or decimal. In your case, the Time field should be of decimal type. I'm thinking you will have to do some kind of conversion, for example, 00:30 should be 0.50, 01:00 should be 1.00, 01:30 should be 1.50, and so on... So that dropdown, change it so that values are the decimal conversions, and display are the time formats.

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – 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.