You are viewing limited content. For full access, please sign in.

Question

Question

Percent must total 100 (form)

asked on May 4, 2021

I have built a form and I'm trying to come up with a way to make it mandatory for the "Percent" field to total 100%. The person filling out the form can either put 100 in the first row, or can add additional rows and assign each a certain percentage, but the rows must total 100. If they do not, I don't want the form to proceed.

How do I go about doing this?

Percent.PNG
Percent.PNG (15.91 KB)
0 0

Answer

SELECTED ANSWER
replied on May 4, 2021

You could add a Total Percent field outside the table and use a formula

=SUM(table.Percent) to get the total sum of the percentage

Then you could use validation to make sure total percent was minimum 100 and maximum 100

3 0
replied on May 6, 2021

Well, this was simple and perfect. Thank you Jared! Worked beautifully (as soon as I changed my percent field to a number field).

1 0
replied on August 12, 2024

I am following the solution Jared provided and when I use the above calculation, I received the 'Calculation contains an invalid variable'.

The form has two tables, so I named the variable and column accordingly

=SUM(table.BARS_number.column.Percent)

and now I get a 'Calculation contains invalid syntax'.  Could someone point out the problem with my syntax? Thanks in advance!

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.