Subtract existing column before form submission - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Subtract existing column before form submission

Last post 12-01-2014 04:03 AM by Miggi03. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-01-2014 02:35 AM

    Subtract existing column before form submission

    Hi all I am looking for a way to subtract the total of a column using a formula. The formula for which I need to subtract the time from is as follows using another text input field. translate(addSeconds(timetoRT, -1 * (substring(timeFromRT, 1, 2) * 3600 + substring(timeFromRT, 4, 2) * 60 + substring(timeFromRT, 7, 2))), "ER?", "") This is a text string and as such the amount subtracted for Lunch breaks etc would also need to be. I'm not sure how to go about this. Any suggestions? Thank you.
  • 12-01-2014 03:53 AM In reply to

    Re: Subtract existing column before form submission

    Hi Miggi03,

    This should be easy to do. You can convert strings to numbers using the number() function. In addition, you can sum a column using the sum() function.

    So, to extract the total of a column, just use sum(field) where field is the column in the repeating group or section.

    You can use default values for the column to auto calculate the fields in advance before summing.

    I'm a little confused about exactly what you are trying to do, so if this doesn't help, please email me.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 12-01-2014 04:03 AM In reply to

    Re: Subtract existing column before form submission

    Thanks Patrick The goal is to minus minutes from the "Hours field" based on the text input from the "Break taken field" The trick part is the "Hours" field is a sum created from the "time from" and "time to" fields. Hope this makes a bit more sense? Thanks again for your reply.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.