Tricky little formula

D

Durbs

So I have a form, (No surprises so far). Amongst other things I have a submit
button that and a Date picker. What I want to do is change the Data
connection on the Submit button based on the Date minus x days. So for
example I want to say if the date is greater than 2 days from today the
button submits an email to (e-mail address removed) and if it is witih 2 days from
today it sends to (e-mail address removed).
i can do the conditional formating part but I cannot figure out the
formula/Expression I can use in the 'Set Condition'.

Any help greatfully appreciated. I can deal with most of the infopath bits
but coding is a rougher road for me.
 
S

S.Y.M. Wong-A-Ton

Are you using InfoPath 2007? If you are, there is a function called addDays
that you can use to add or subtract days. If you're using InfoPath 2007 and
need help getting the condition to work, let me know; there is a neat trick
you can use to get the right formula without much pain.
 
D

Durbs

Thanks to all for the updates, for those lookign to do this in teh furure
the AddDays function works well.

Basically I created a datepicker and set it to today, then set a date picker
and set it to be the first datepicker date -2 days and then a third date
picker that users could set their dates in and told it to look at the -2day
date picker and apply rules accordingly.

Thanks to Clay Fox and SYM Wong-A-Ton for the time to respond.

Happy Deving
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top