cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

preconfigured Date to be validated

Jump to solution

Hi all,

 

First time poster :)

Project

Capture new users, changes to existing users and termination of users.

I have a ValidFrom (set as today by default) date field and ValidTo date field that has 12/31/2099 as the default date entered. 

I also have a choice(called Statusofrecord) dropdown with 3 options (Starter/Changer/Leaver).

I'm trying to create a rule that throws an error message with the following conditions

IF Statusofrecord = 'Leaver' & Validto = 12/31/2099 Then Error message.

 

I select the Statusofrecord dropdown, create a rule and tried entering this Statusofrecord=='Leaver' && ValidTogreaterThanOrEqual(formatDate('12/31/2099'))

No matter what I try (without formatting date etc) the rule doesn't apply.

If I remove the Validto part (keeping only  Statusofrecord=='Leaver') then the error message appears.

 

Could someone kindly point me in the right direction, I've been trawling through the forums, youtube and a Lynda.com course to try and find an answer.

 

thank you to anyone who can help.

 

Sharepoint is on-premise 2013

Labels: (1)
Tags (2)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: preconfigured Date to be validated

Jump to solution

Hi,

 

Add this as a validation rule to your ValidTo Date control.

Dont just cut and paste this rule, make sure you replace StatusOfRecord etc with your named controls so they turn red.

With the dates I decided to say "if the year is 2100 onwards" its invalid.

 

and(equals(StatusOfRecord,"Leaver"),greaterThan(formatDate(ValidTo,"yyyy"),formatDate("12/31/2099","yyyy")))

 

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: preconfigured Date to be validated

Jump to solution
Thank you SimonMuntz.
I tweaked the solution with the logic you applied

and(equals(Statusofrecord,"Leaver"),greaterThanOrEqual(formatDate(ValidTo,"yyyy"),"2098"))

I appreciate the help and quick answer
Reply