Skip to main content
cmvarga5
Known Participant
November 14, 2024
Answered

Calculation (sum of multiple fields) no more than 100%

  • November 14, 2024
  • 1 reply
  • 696 views

I created a field that all calculates to a total, but should be no more than 100%. Is there a way to cap the amount at 100%? I put this in the Validate tab, and it still doesn't work:

CORRECTION:

It works with a warning that the value is over 100

However, if you click "OK", the value in the calculated field keeps the previous total amount before entering a value in the last number field to be calculated:

Is there a way to clear that last number field, or at least, clear the TOTAL field if it is wrong/over 100?

This topic has been closed for replies.
Correct answer try67

Just saw your correction... Try this:

if (event.value>100) {app.alert("Value can't exceed 100."); event.value = "";}

1 reply

try67
Community Expert
Community Expert
November 14, 2024

Use the script option with this code:

if (event.value>100) event.value = 100;

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 14, 2024

Just saw your correction... Try this:

if (event.value>100) {app.alert("Value can't exceed 100."); event.value = "";}

cmvarga5
cmvarga5Author
Known Participant
November 15, 2024

Thank you so much!!!!