Complicated time calculation - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Complicated time calculation

Last post 01-29-2009 01:04 AM by Jimothias. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-28-2009 02:37 AM

    Complicated time calculation

    Greetings all :0)

    I'm relatively new to the world of InfoPath so I'm learning all the time and would appreciate some help :0) Not the first time, probably not the last, but I'm glad this place is full of helpful people.

    I've been making a form that submits to a MS SQL box and I'm using the "Database" form template. I found that I can only use either the Query fields or the Data fields. I wonder if anyone knows if there is a way I can insert some of my own controls (not to be submitted). At the moment I'm using some of the query fields that I'm not using which in turn populate the data fields that remain the same throughout.

    The problem I have is that I am trying to work out the differences between 2 time fields. I've followed the guide here: which when I create a new form and follow it works perfectly. I do change certain coding to match my own form eg -
    (((number(substring(../my:endTime, 1, 2)) * 3600) + (number(substring(../my:endTime, 4, 2)) * 60)) - ((number(substring(., 1, 2)) * 3600) + (number(substring(., 4, 2)) * 60))) div 3600
    (((number(substring(../@finish_time, 1, 2)) * 3600) + (number(substring(../@finish_time, 4, 2)) * 60)) - ((number(substring(., 1, 2)) * 3600) + (number(substring(., 4, 2)) * 60))) div 3600

    When I click Verify Formula it all reports as ok and such. The only thing I wonder is that I cant turn the data fields I'm using into the right type and format like I can in the normal form rather than the "Database" template form.

    If anyone can see where I am going wrong I would really appreciate a pointer :0)

    Thanks in advanced


  • 01-28-2009 08:58 AM In reply to

    Re: Complicated time calculation

  • 01-28-2009 09:29 AM In reply to

    Re: Complicated time calculation

    Hi -- you should be able to add fields to the data source for a form that was created from a database -- but only to the root node. If you select the top folder in your form's main data source, you should have the option to add  a field.

    Hilary Stoupa

  • 01-29-2009 01:04 AM In reply to

    Re: Complicated time calculation


    Thanks for that, thats a great help :0) However any fields I add seem unable to repeat themselves properly in my repeating table. Anything I put in the top row automatically replicates itself to the additional rows I put in. I tried setting them to repeat and even the GROUP I put them in to repeat. Any help would be brilliant :0)





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