How to set validation for a past date(s) in infopath form - InfoPath Dev
in

InfoPath Dev

How to set validation for a past date(s) in infopath form

Last post 03-11-2015 09:48 PM by shashikant. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 03-09-2015 09:32 PM

    How to set validation for a past date(s) in infopath form

     I need to limit the users to enter the data for say last one week. Have tried Field(current date)-7 in validation but does not trigger an error. Please help!

  • 03-10-2015 11:37 AM In reply to

    Re: How to set validation for a past date(s) in infopath form

    Hi shashikant,

    I usually use a date validation error with a condition like this:

    field1 > addDays(today(), -7)

    Would this approach work for you?


    Regards,
     

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 03-10-2015 12:30 PM In reply to

    Re: How to set validation for a past date(s) in infopath form

     Thank you so much. I have tried this as well but somehow it is not working. I am new to InfoPath. I have a form where there are two date fields & it will be used for saving exceptions for defects. Now I need to ensure that no one is able to enter any exception more than 7 days prior to current date(Today). Field 1 is today & Field 2 is the date of exception.

     

    Please help! 

  • 03-11-2015 08:48 AM In reply to

    Re: How to set validation for a past date(s) in infopath form

    Hi shashikant,

    If you are using field1 as the date for today, you will have to use this formula instead: 

    field2 > addDays(field1, -7) 

    Hope this helps.

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 03-11-2015 09:48 PM In reply to

    Re: How to set validation for a past date(s) in infopath form

     Thank you so much! That was perfect!

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