Time field show error message - InfoPath Dev
in

InfoPath Dev

Time field show error message

Last post 04-22-2011 05:19 AM by tafavorite. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-21-2011 11:43 AM

    Time field show error message

    Hello all. I have a field that is formatted to time. The problem is the field just shows a red-dashed border if the user enters anything over 23:59:59. How can you have a validation run that the user does not enter anything above that? I have tried a few scenarios, but its just not working. Any help is appreciated.

  • 04-21-2011 01:57 PM In reply to

    Re: Time field show error message

    You can put a rule on the Submit button that does not allow it to submit a form that has an error, either on that field or any field. You might also consider putting some guiding text indicating that the value must be <  23:59:59 

    Filed under: ,
  • 04-22-2011 05:19 AM In reply to

    Re: Time field show error message

    Okay, I have gotten the time field to show an error message if the user enters anything above or equal to 24. The next problem is that if the user enters in 2300 or 2359, the error message pops up. I am using an action rule that converts those numbers to time format, and in order for the time validation to work, I put a rule on the action that is the following:

    xdUtil:Match(string(.), "\d\d\d\d")   and

    msxsl:string-compare(., "23:59:59") <= 0

     It works fine if you enter 2200 or 2259, but once you enter 2300, it just does not like it and gives the error message.

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