cancel
Showing results for 
Search instead for 
Did you mean: 
goodplans4us
Nintex Newbie

Greater than formula for a maximum # of lines

Jump to solution

Hello!

I am creating a repeating section for cost centers.

fn-GreaterThan()

I want the formula to make it so that the maximum amount of repeating lines is no greater than the amount of choices selected in a previous question i.e. if they choose 5 states, there should only be 5 cost centers but if they choose 10 states there should be 10 cost centers. Is using "Greater Than" the start of the formula or should I use something else? How can a make a formula that fits what I want to do?

Labels: (1)
0 Kudos
Reply
8 Replies
Automation Master
Automation Master

Re: Greater than formula for a maximum # of lines

Jump to solution

Hi Jennifer Smith

You cannot reference the form field in the repeating section maximum rows configuration. You can create a formula but cannot reference another field to restrict it.

see this for reference as a start:  

Reply
goodplans4us
Nintex Newbie

Re: Greater than formula for a maximum # of lines

Jump to solution

Thank  you. Unfortunately I do not know javascript

0 Kudos
Reply
Automation Master
Automation Master

Re: Greater than formula for a maximum # of lines

Jump to solution

maybe it's not exactly what you figured out, but if you want to avoid any javascript it might be sufficient for you ...

so try following.

there is a currentRowNumber() runtime function which can count rows in repeating section.

so, add a calculated value control and set  its formula to calculate current row number

eg.

next, just to have some content in repeating section I added a text box  and named it 'text'

note this control was used in above formula

then I added one another calculated value control to provide a warning if max number of rows is exceeded

to get max number of possible rows I added a text control out of repeating section and named it MaxLines

finally I set up two formatting rules which show/hide either 'content' control or warning message

rule for content control

and rule for warning message with opposite logic

overall setup looks like this

Reply
goodplans4us
Nintex Newbie

Re: Greater than formula for a maximum # of lines

Jump to solution

Can the max lines be different for each submission based on the answer to the previous question? If person A chooses 5 markets the max amount of cost centers he can enter is 5. However, if person be selects 10 markets the max amount of cost centers he can add is 10.

0 Kudos
Reply
Automation Master
Automation Master

Re: Greater than formula for a maximum # of lines

Jump to solution

sure!

have a closer look on my example - I have there a input box (named MaxLines) above repeating section that defines how much entries are max allowed within repeating section.

I used 3 in that example.

0 Kudos
Reply
Automation Master
Automation Master

Re: Greater than formula for a maximum # of lines

Jump to solution

Hi ‌, did this worked for you?

0 Kudos
Reply
goodplans4us
Nintex Newbie

Re: Greater than formula for a maximum # of lines

Jump to solution

Hi! ‌ I ended up going a different direction so I didn't try this one.

0 Kudos
Reply
bimi82
Nintex Newbie

Re: Greater than formula for a maximum # of lines

Jump to solution
What was the solution in your case? I am after similar approach ... when user selects: 3 Items then the repeated section should not allow to add more than 3 rows.
0 Kudos
Reply