Date picker validation and rules - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Date picker validation and rules

Last post 01-06-2012 10:37 AM by Granzip. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-23-2011 05:13 AM

    Date picker validation and rules

    Hi all,

    On my form, I have two date fields.  One populates itself with today's date... the other is a date picker, to allow the user to choose a date for delivery of goods.

    At the moment, I have a rule on the field which is an action.  Basically if the date is greater than today() it pops up a message advising them that 'Next Day deliveries must be authorised first'.  However, this occurs for ALL dates in the future, not just the next day.

    What formula can I use that would just show this pop up message for the next day?  i.e. If today is the 23/03/11, I would like the message to pop up if the 24/03/11 is selected, but not if the 25th, 26th etc etc is selected.

    I hope that makes sense!

     

    Thanks all

    James

  • 03-23-2011 06:51 AM In reply to

    Re: Date picker validation and rules

    Hi. If you're using IP2007 or greater, then you can use the xPath function addDays(<date>, <days to add>). So you could compare today() to addDays(today(), 1).
  • 01-06-2012 10:37 AM In reply to

    Re: Date picker validation and rules

    How do you accomplish this if you are using InfoPat 2003? What code can you use to replace the addDays function in Infopath 2007 or greater?

     

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