cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rule for Date Control not working

I have a Date Control field in my form called "Date Delivery Requested". I'm trying to add a rule to this field using Nintex form 2013.

The rules are:

1. The Date field should not be empty

2. Selected date can not be earlier than Current Date

3. Selected date should always be Current Date +14 days

I'm using the following formula:

(!isNullOrEmpty({Self})) && (varDateDiff <15 || DateDeliveryRequested < CurrentDate).

"(varDateDiff <15 || DateDeliveryRequested < CurrentDate)" this part of the formula works fine on it's own, however when I combine it with "(!isNullOrEmpty({Self}))", the formula doesn't work. Am I doing something wrong? Any help is much appreciated.

Thanks in advance :-)

Sunil

PS: The variable varDateDiff = dateDiffDays(Current Date,DateDeliveryRequested)

Labels: (1)
0 Kudos
Reply
3 Replies
christopheraucq
Nintex Newbie

Re: Rule for Date Control not working

Hi Sunil,

In O365, the Condition says: Control is invalid if ...

Then should not it be isNullOrEmpty({Self}) to test if the field is empty?

Regards,

Christophe

Reply
Not applicable

Re: Rule for Date Control not working

Hi Christophe,

Thanks for your reply. You're right! I should've used "isNullOrEmpty({Self})" instead of "(!isNullOrEmpty({Self}))".Although, it still didn't give me the result that I wanted.

However since my field is a Date control I tweaked the formula to the following and now I get the result that I want :-)

(varDateDiff <15 || {Self}< CurrentDate) && isDate({Self})

Cheers,

Sunil

0 Kudos
Reply
espradli
Nintex Newbie

Re: Rule for Date Control not working

What if you want the date and time controls to be empty? It keeps defaulting to todays date, even though I have the event date start and end columns configured to "none".

0 Kudos
Reply