Field validation condition: How to ensure a date-time field is between 8:00am and 2:30pm - InfoPath Dev
in

InfoPath Dev

Field validation condition: How to ensure a date-time field is between 8:00am and 2:30pm

Last post 05-25-2012 11:54 AM by Anson Hidajat. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-25-2012 06:40 AM

    Field validation condition: How to ensure a date-time field is between 8:00am and 2:30pm

    User has requirement that the time portion of a SharePoint date-time field (as presented in InfoPath form) must be between 8:00am and 2:30pm.

    So "01/25/2012 08:25:00 AM"  would be acceptable

    whereas "07/12/2011 04:32:00 PM" should be flagged as an error

     Any thoughts on how to code or phrase the rule condition?

  • 05-25-2012 11:54 AM In reply to

    Re: Field validation condition: How to ensure a date-time field is between 8:00am and 2:30pm

    If you broke up the time elements into separate pieces it would be pretty easy with some rules to make sure the time falls within your window.  So have an hour control, minute control, and am/pm dropdown.  Then create your custom logic to ensure that the time is between 8am and 230pm.  Hope that makes sense.  If you need some more detail on how to create the rules I'd be happy elaborate some more.
    Anson Hidajat
    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.