Date fields validation - InfoPath Dev
in

InfoPath Dev

Date fields validation

Last post 04-10-2012 10:50 PM by Jimmy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-26-2010 05:47 AM

    • SWAM
    • Not Ranked
    • Joined on 10-26-2010
    • Posts 3

    Date fields validation

    Hello there,

    I have created a form, which havetwo date fields. I want to make sure that Staring date is always less than End date. Any one have a smart idea, as i am new to InfoPath.

    Thanks.

  • 10-26-2010 08:00 AM In reply to

    Hi -- you can add validation to both the Start and the End date fields. Right click on the field in the data source task pane and select properties. Under the Validation tab (if you are using IP 2010, I think this may be under rules, so you'll need to click the Manage Rules button for the field instead of the properties) you can add validation rules. For end date, for example, the rule would have the conditions Start is not blank and Start is not less than End. You can enter the error message you'll show the user, and even pop up an error message!
    Hilary Stoupa

  • 10-27-2010 02:04 AM In reply to

    • SWAM
    • Not Ranked
    • Joined on 10-26-2010
    • Posts 3

    Thanks Hilary for your hints. Now it works the way i want.

    Take Care

  • 04-10-2012 05:57 PM In reply to

     

    Hi Hilary

    I am trying to use a similar validation were the date can not be "less than"  the date the form was created. Which works fine if it is not equal to the date the form was created. When this scenario occurs I recieve the validation msg I want the user to be able to use a date that is equal to. do you have any tips on a work around.

  • 04-10-2012 10:50 PM In reply to

    How about something like this:

    translate(substring(firstDate, 1, 10), '-', '') > translate(substring(secondDate, 1, 10), '-', '')

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.