# Combining Formulas

• 0
• Question
• Updated 1 year ago
Hello,

I posted a question and got this answer:

([Payment Amount]-[Client Fee Due]-Nz([Override Due]))/2

This was VERY helpful; however, I would like to also do an override on certain sales groups.  Here is what I suggest but there is an error.

If([Marketing Rep],= "SALES REP A", [Payment Amount]*.07)

or

([Payment Amount]-[Client Fee Due]-Nz([Override Due]))/2

• 130 Points

Posted 1 year ago

• 0
• 72,640 Points
Try this

If([Marketing Rep],= "SALES REP A", [Payment Amount]*.07),

([Payment Amount]-[Client Fee Due]-Nz([Override Due]))/2)
• 130 Points
I am getting a syntax error.  I'm not able to find the problem.  Any help would be appreciated, thanks.
• 72,640 Points
Sorry
There was an extra comma

If([Marketing Rep]= "SALES REP A", [Payment Amount]*.07),

([Payment Amount]-[Client Fee Due]-Nz([Override Due]))/2)
• 130 Points
Now it is saying there are extra characters beyond the end of the formula.
• 130 Points
Any additional help would be appreciated.  Thanks,

Evan Martinez, Community Manager

• 12,388 Points
Hi Jake,

Do you still get this error message if you try this version:

`If([Marketing Rep]= "SALES REP A", [Payment Amount]*.07, ([Payment Amount]-[Client Fee Due]-Nz([Override Due]))/2)`
• 130 Points
Hello Evan,

Yes I still get an error message for a formula syntax error.  (there are extra characters beyond the end of the formula)

Evan Martinez, Community Manager

• 12,388 Points
Unfortunately it does not look like that screenshot came through. When that error message pops up does it give you an indication where the extra character is? It often underlines or highlights the character that is beyond the end of the formula in the pop up message. Is that the full formula or does it connect to anything else or have any other characters in there? The version I posted back took out one of the parenthesis so ideally that should have resolved any extra characters.
(Edited)
• 130 Points
Understood.  It highlights the whole formula after the comma in the first formula (at the end of the formula).  Sorry the screenshot didn't work
(Edited)

Evan Martinez, Community Manager

• 12,388 Points
Hi Jake,

That is unusual, so in this line shown [Payment Amount]*.07, it specifically breaks on the , or just after it? Previously there was another ) there that would have broken the formula. If you are still getting an error you might want to put in a support case so that a Rep can visit your app and take a look at that formula to see what else might be going on.
• 130 Points
It breaks on the comma.  I can put in a support case if you want me too.

Evan Martinez, Community Manager

• 12,388 Points
Hi Jake,

At this point I would suggest a Support Case just to be sure. A Care Team member can take a look at it with an invite to the app and see what is going on since the screenshot didn't seem to work. Then they can help you troubleshoot the formula. Sometimes seeing it in the app environment helps to put the error into context since the suggested changes didn't stop the error.