0

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

=(NumberOfSessionsAge35+NumberOfSessionsGrade15+NumberOfSessionsGrade68+NumberOfSessionsGrade712)

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

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 that you have read and understand our privacy policy and code of conduct.

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