Count the returned lookup values in Nintex Form

  • 10 October 2016
  • 5 replies
  • 26 views

Badge +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

Userlevel 7
Badge +17

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?

Userlevel 5
Badge +14

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

Badge +6

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

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

Userlevel 5
Badge +14

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

Badge +6

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!

Reply