Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Nintex Community
- :
- Forums
- :
- Nintex for SharePoint
- :
- Greater than formula for a maximum # of lines

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

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?

Solved! Go to Solution.

8 Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

Thank you. Unfortunately I do not know javascript

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Re: Greater than formula for a maximum # of lines

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.