I'd like to give a discount based on the number of camp sessions signed up for in a repeating section but can't figure out the formula for doing that. Help?

In the repeating section called "Camper Information" I have a choice box called "sessions":


July 1-5 $225

July 7-12 $225

July 14-19 $225

July 21-26 $225

I'm trying to make a calculation that will do:

number of sessions > 1 but < 3 gives a 5% discount

number of sessions > 4 gives a 10% discount



Calculations for Repeating Sections in Cognito Forms, allow you to easily filter and total lists of structured information.

You can find detailed documentation for calculations involving repeating sections here: https://www.cognitoforms.com/support/51/calculations/repeating-sectionstables

For your specific example, the following calculation will automatically calculate the number of selected sessions across all repeating sections:


You can then use this inside a discount calculation for a Price field outside of the repeating section as follows:

   if CamperInformation.Sum(Sessions.Count) > 3 then -0.1 
   else if CamperInformation.Sum(Sessions.Count) > 1 then -0.05 
   else 0
 ) *
  • Talk about kindness from strangers. Thanks so much, the formula worked perfectly! Dec 27 '15 at 18:27
  • Glad it worked!!! Dec 30 '15 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.