How to set validation for a past date(s) in infopath form - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » How to set validation for a past date(s) in infopath form 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: Oldest to newest Newest to oldest Previous Next 03-09-2015 09:32 PM shashikant Joined on 03-09-2015 Posts 3 How to set validation for a past date(s) in infopath form Reply Contact 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 donstephen Joined on 05-20-2013 Posts 623 Re: How to set validation for a past date(s) in infopath form Mark as Not AnswerMark as Answer... Reply Contact 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 shashikant Joined on 03-09-2015 Posts 3 Re: How to set validation for a past date(s) in infopath form Mark as Not AnswerMark as Answer... Reply Contact 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 donstephen Joined on 05-20-2013 Posts 623 Re: How to set validation for a past date(s) in infopath form Mark as Not AnswerMark as Answer... Reply Contact 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 shashikant Joined on 03-09-2015 Posts 3 Re: How to set validation for a past date(s) in infopath form Mark as Not AnswerMark as Answer... Reply Contact 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.
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!
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,
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!
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.
Thank you so much! That was perfect!