I am creating a repeating section for cost centers.
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.
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.
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
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
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.
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.