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

Validations on Multiple Lookup Values

Jump to solution

Hello all,

I have a form that has a Status dropdown that is connected to a lookup list.  For every item within that Lookup list, I have a corresponding Date field.  So I have it set up like this:Status.png

 

 

Dates.png

 

Using the following formula, I can get the Draft date to invalidate when Risk Status has be set to Draft.formula.png

parseLookup(RiskStatus) === "Draft" && isNullOrEmpty({Control:Self})

So that's great!  That's exactly what I want. working.png

 

However, all these statuses should be visited in order during the course of my users' work.  So after Draft, this task should go into Pending Assignment.  But, I want to make it so that if a user tries to skip Draft and go directly to Pending Assignment, leaving the Draft Date field blank, it will invalidate the Draft Date field.  Every modifcation to this formula that I've tried has not worked.  It either doesn't honor the validation, or invalidates without me specifying the an additional status.  For example if I modify with just the additional next status:

 

parseLookup(RiskStatus) === "Draft", "Pending Assignment" && isNullOrEmpty({Control:Self})

The Draft Date field invalidates no matter what status I choose.

 

parseLookup(RiskStatus) === "Draft" || "Pending Assignment" && isNullOrEmpty({Control:Self})

Behaves the same way.

 

I'm thinking this is something simple, I'm just not thinking of.  I would greatly appreciate any help anyone can provide.

 

 

 

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

Re: Validations on Multiple Lookup Values

Jump to solution
If you want to make sure that the form is completed in order all you need to do is set a rule on each date control that says "If I am empty but the next control along is not" invalidate.
!isNullOrEmpty(Date2)&&isNullOrEmpty(Date1)

View solution in original post

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Validations on Multiple Lookup Values

Jump to solution

@SimonMuntz wrote:
If you want to make sure that the form is completed in order all you need to do is set a rule on each date control that says "If I am empty but the next control along is not" invalidate.
!isNullOrEmpty(Date2)&&isNullOrEmpty(Date1)

Thank you!  I'll give this a try and mark this as the solution if it ends up working for me.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Validations on Multiple Lookup Values

Jump to solution

So @SimonMuntz , I did used your idea and only modified it a little.  I have my original rules that strictly look at the status and validate the corresponding date field.  Then, for a second rule I used your formula and here's how I modified it:

 

!isNullOrEmpty(Date2) && isNullOrEmpty({Self})

And I just applied the same formula to every date field after, updating the date field name as I went.

 

Thanks for this!

0 Kudos
Reply