cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Validate Array values in forms

Jump to solution

I am building a form with repeating section.

The values in one of the columns of the repeating section is part of a calculated field. I need to find if at least one of the value in this array is greater than or equal to 10.

For e.g. if array looks like this: [10,3,3] OR [1,12,4] using JScript validation or Rule validation, I need to know if there is any value greater than or equal to 10. 

I'm using SP2013, Nintex forms 2.10.1.0

I have tried to get the value of the array in JScript variable and iterate through each value to find item greater than or equal to 10. The function {variable.length} in JScript returns the number of characters in the string as opposed to number of items in the array.

---[1] returns 3 instead of 1.

Let me know if that is not the case and there is an easier solution. Thanks for your help.

Labels: (2)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: Validate Array values in forms

Jump to solution

I would place a calculation in each repeater row that would directly compare against the limit.

if it were less you would get 0

if it were greater you would get 1

then out of the repeater you can simply sum() over that column. if result ig greater then 0 you are sure there must have been at least one row that exceeded limit.

see similar example https://community.nintex.com/message/32366?commentID=32366#comment-32366 

Reply
Workflow Hero

Re: Validate Array values in forms

Jump to solution

That's brilliant

Reply