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
Best Answer
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