Skip to main content
Nintex Community Menu Bar

Count the returned lookup values in Nintex Form

  • October 10, 2016
  • 5 replies
  • 62 views

Forum|alt.badge.img+6

Hi All,

Does anybody know how can I count the values returned by a lookup formula?

I have a lookup in Nintex Form that returns duplicated values from a list, so its an array of value.

Example: Lookup returns: 

[1;#Training A,1;#Training A]

I would like to count the number of duplicate values returned so in this example it would "2".

My goal is to count how many people were applying for a particular training and not allowing the class number to grow over the limit. It would be good if I can prompt them while in the form, so I prefer a no workflow solution if possible.

5 replies

Forum|alt.badge.img+17
  • Nintex Partner
  • October 10, 2016

I don't believe the runtime function Count works on lookup control values, but is for repeating sections. Maybe you could name the control's javascript value and find the Length of the array?


Forum|alt.badge.img+14
  • Scholar
  • October 11, 2016

length() returns number of items in an array so I would say it should work on lookup result as well.


Forum|alt.badge.img+6
  • Author
  • October 11, 2016

The length() and count() are both returning the character number not the number of items.

so its returning like "30" and not "2".


Forum|alt.badge.img+14
  • Scholar
  • October 11, 2016

I've tested it right now and it works for me...


Forum|alt.badge.img+6
  • Author
  • October 11, 2016

Thank You Marian!

What I was doing differently that my output column was a lookup type field as well, I guess that what make it break. 

Now it works!