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

compare 2 list lookup fields

Jump to solution

The Nintex form has 2 list lookup fields and the requirement is to compare the data between these two fields and then display a message if the data is the same.

The list lookup field takes data from SharePoint list which are display names, so if user picks UserA from LookupfieldA and also picks UserA from LookupfieldB , then a message must be displayed on the screen.

The list lookup field in Nintex does not have in-built compare validator, hence I assume will have to implement this requirement using custom JavaScript function.

Can anyone please help me with this one?

Tags (1)
0 Kudos
Reply
6 Replies
Automation Master
Automation Master

Re: compare 2 list lookup fields

Jump to solution

Hi Prajna,


No need for custom Javascript - all you really need to do is create a Nintex Form Rule (type Formatting) right from the Form Designer that unhides a label (containing the message) that you want displayed when the two controls are equal.

-Mike

View solution in original post

Reply
Not applicable

Re: compare 2 list lookup fields

Jump to solution

Thanks Mike for your response. Yes, I was able to compare the fields using the Formatting rule that you mentioned. However, I was unable to validate this during form submission.

I should not be able to submit the form if both these fields are the same, but this cannot be achieved if Formatting rule is used.

0 Kudos
Reply
Automation Master
Automation Master

Re: compare 2 list lookup fields

Jump to solution

Hi,

If you want to validate, then use rule of type Validation instead. This will trigger the rule on submit and display your custom message, you can eliminate the use of a label in this case.

Thanks

Reply
Not applicable

Re: compare 2 list lookup fields

Jump to solution

Thanks a lot for your help Mike. I was able to achieve what I had requested for.

Reply
pam_lewis
Nintex Newbie

Re: compare 2 list lookup fields

Jump to solution

Hi,  I have the same situation in Nintex 2013 - using the Rule type Validation, comparing the value of 2 fields and the message is displayed.  BUT  when the value of  Field2 is changed and Save button clicked the error message remains.  It appears it is not refreshing the value in Field2.?    

This is the code in the Condition -  {ItemPropertySmiley FrustratedigPasscodeWitn} == {ItemPropertySmiley FrustratedigPasscodeTest}

The fields are list lookups.

0 Kudos
Reply
pam_lewis
Nintex Newbie

Re: compare 2 list lookup fields

Jump to solution

could you contribute the code you used in the Validation - Condition ?  I am trying to do the same but seems not refreshing the field values when changed/corrected.  yhankyou

0 Kudos
Reply