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

How to validate a List lookup control

Jump to solution

Hi 

I want to make sure a value is selected from a List Lookup control. 

I've tried using : isNullOrEmpty(parseLookup(ProjectLookup,True))  and can't see why this won't work.

No value is returned from the parseLookup if nothing is selected in the drop down, however isNullOrEmpty seems to think something is returned as it is never invalid.

I've also tried separating out the parselookup to a calculated value with a name and then validating that for empty. Still doesn't work. 

I've also tried validating the control itself on 'ProjectLookup'. I feel like that should work as well. isNullOrEmpty(ProjectLookup) or isNullOrEmpty(self)

Not sure what else to do.

Labels: (2)
0 Kudos
Reply
7 Replies
MegaJerk
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

Interesting. The rule: 

isNullOrEmpty({Control:Self})

should do exactly what you're after. Just copy and paste the above text into your editor. 

Here is the same rule in a formatting rule that turns the background into a terrible purple-ish color if the field is left blank. 

This is the result when nothing is selected: 

This is the result otherwise: 

0 Kudos
Reply
harfmt
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

Well I had already tried that along with many other options. Why does this work for formatting and not for validating? Although it does bring it to their attention it doesn't stop them from leaving it blank. 

0 Kudos
Reply
MegaJerk
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

So, if you're just taking the rule above, and you're putting it into a Formatting Rule and finding that it does at least work. 

Switching it to Validation should also make it work for Validation. 

However... There may be something else going on that is causing the form to act strangely when submitting. 

Are you using a Save and Submit button or just a Save and Continue? 

If you're using a Save and Submit button (which should kick off Validation Rules), do you see the control go invalid before being submitted? 

If so, right before you submit the form, could you maybe press F12 to open up the Developer's Console in your browser and then see if any errors are logged once you do hit that button? 

I have had an experience before that was similar to your when I put a control inside of a Repeating Section, and using the Control's properties, setup some min / max math values on it. For whatever reason, generating a new row would break the Rule System and allow me to do silly things like submit an invalid form. 


0 Kudos
Reply
harfmt
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

I think that was the problem, in preview I was using the Save button instead of the submit button. Sigh. 

0 Kudos
Reply
MegaJerk
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

We've all been there  

Did it at least fix the validation issues? 

0 Kudos
Reply
harfmt
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

oh yes. it worked all along, just not with a save. so all good now. thanks!

Reply
jkweaver
Nintex Newbie

Re: How to validate a List lookup control

Jump to solution

Was reading through this thread as I am searching for a solution that involves a List Lookup and validation rule. My situation is just slightly different, but very close. I have a List Lookup on my form that has two drop down values (Add New Vehicle and Replacement Vehicle). These each are connected to a panel via a rule to hide/unhide depending on the value selected in the drop down (list lookup). 

 

I am trying to add a validation rule to the next set of sections: Year, Make, Model. These are single text input fields. What I am attempting to build are validation rules that require an input to Year, Make, and Model. If the field is empty, then it would display a message requiring information be input.

 

I have tried a few things based on solutions that others have used but when I click the Save/Submit button, it doesn't stop and fire the message. Alot of what I have seen are validaiotn rules working on a Choice menu. Any thoughts? 

0 Kudos
Reply