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: http://www.bizsupportonline.net/infopath2003/time-calculations-infopath-using-rules.htm 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
became
(((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
James