Skip to main content
Nintex Community Menu Bar

Can we compare dropdown values in Repeating section?

  • May 11, 2015
  • 8 replies
  • 17 views

Forum|alt.badge.img+4

Hi,

Can we compare dropdown values in Repeating section?

I would like to compare the dropdown values in Repeating section to avoid duplication records. Can we use compare validator for Repeating section?

Could someone maybe help me out?

Thanks,

Swap

8 replies

Forum|alt.badge.img+4
  • Author
  • Rookie
  • May 11, 2015

Hi,

Just found below solution on internet.

1. insert below javascript to Form Setting Custom Javascript section

function allValuesUnique(Item)

{

var allValuesUnique = true;

debugger;

NWF$.each(Item, function (key1, value1) {

NWF$.each(Item, function (key2, value2) {

if (key2 != key1 && value2 == value1)

{

allValuesUnique = false;

}

});

});

return allValuesUnique;

}

2. Create a new rule based on Repeater section

3. Select Rule Type - Validation

4. Set Condition - !allValuesUnique(<Dropdown Control Name>)

Thanks,

Swapnil


Forum|alt.badge.img+9

Hi, The script is not working for me, is this working for you?


Forum|alt.badge.img+4
  • Author
  • Rookie
  • August 10, 2016

Yes, all runs fine. Have you created rule and specified name of the dropdown in it?

189365_pastedImage_1.png

189328_pastedImage_0.png

Swap


Forum|alt.badge.img+4
  • Author
  • Rookie
  • August 23, 2016

Have you tried below solution again?


Forum|alt.badge.img+9

That didn't work for me probably because my dropdown is a lookup value from another list


Forum|alt.badge.img+4
  • Author
  • Rookie
  • August 24, 2016

I think this solution should work for lookup field dropdown value as well.

190246_pastedImage_0.png

190256_pastedImage_1.png


Forum|alt.badge.img+9

I will again try and will let you know If I am getting any error


Forum|alt.badge.img+1
  • March 20, 2019

Hi, could be done also without JS with classic rules? If you use responsive design forms you can't use JS anymore. Thanks.