I've created a calculation field called "Total Number of Sessions"


I'd like to give a discount based on the number of sessions:

=(if TotalNumberOfSessions() > 3 then -TotalPrice*0.10 else if TotalNumberOfSessions() > 1 then -TotalPrice*.05 else 0)

But I get an error message saying:

No applicable method 'TotalNumberOfSessions' exists in type 'Cognito.Forms.FormEntry.Edenacres1.SummerOutdoorsSignUpForm' at character 4

Can anyone help me set up the correct formula?

My form template is at this link: https://www.cognitoforms.com/templates/shared/Edenacres1/SummerOutdoorsSignUpForm

1 Answer 1


It looks like you've already figured this out, but for completeness the () are what is causing Cognito Forms to think you are trying to call a method.

The formula will be something like: =TotalNumberOfSessions > 3 ? -TotalPrice*0.10 : TotalNumberOfSessions > 1 ? -TotalPrice*.05 : 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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