Copy link to clipboard
Copied
I have 3 fields I need to subtract to get a total. I've read several examples watched an online video that describes how to subtract 2 numbers to get a sum, but I can't get this to work.
Field names are:
MDL TOTAL AMOUNTRow1
AMOUNT OF THIS PAYMENTRow1
TOTAL AMOUNT OF PREVIOUS PAYMENTSRow1
I wrote the equation like this: MDL TOTAL AMOUNTRow1-AMOUNT OF THIS PAYMENTRow1-TOTAL AMOUNT OF PREVIOUS PAYMENTSRow1
Any suggestions?
Copy link to clipboard
Copied
It will work if you remove the spaces from the field names and update the simplified field notation using the new field names, e.g.,
MDL_TOTAL_AMOUNTRow1 - AMOUNT_OF_THIS_PAYMENTRow1 - TOTAL_AMOUNT_OF_PREVIOUS PAYMENTSRow1
Copy link to clipboard
Copied
That should work, but you need to add a back-slash before each space in the fields' names.
Copy link to clipboard
Copied
try67...removed the spaces for simplicity sake (was posting new field names as your post showed up)...still no joy...
Copy link to clipboard
Copied
It will work if you remove the spaces from the field names and update the simplified field notation using the new field names, e.g.,
MDL_TOTAL_AMOUNTRow1 - AMOUNT_OF_THIS_PAYMENTRow1 - TOTAL_AMOUNT_OF_PREVIOUS PAYMENTSRow1
Copy link to clipboard
Copied
George...sorry, but you lost me. I removed the spaces (actually was updating my post as yours showed up) but then you inserted underlines between the words. Is that what is needed still?
Copy link to clipboard
Copied
HEY HEY...it worked!!! I added the underlines between words and got the result I expected.
You're a life saver, this was driving me nuts!
Copy link to clipboard
Copied
You don't need to use underlines, you could instead do what you said you did by removing the spaces. You need to make sure you're using the exact field names, and then check the JavaScript console (Ctrl+J) to see if any errors are reported there.
Copy link to clipboard
Copied
George...the underline(s) worked. I'll stick to that...any success at this juncture is gold!! Thanks for helping out.
Copy link to clipboard
Copied
George...maybe I was a little too excited a little too quickly.
I've got 10 rows of the same calculation, differentiated by "Row1" Row2" Row3" etc. I did the exact thing on Line 2(copied, pasted and changed the 1 to a 2 and the 1 to a 3) on lines 2 & 3 and can't get the formula to work.
Arrrggghhhh...suggestions?
Copy link to clipboard
Copied
AND...my first attempt is no longer working........
Copy link to clipboard
Copied
Double check the field names, check the JavaScript console (Ctrl+J) for errors, and check that the field calculation order (not the same as the tab order) is correct.
Copy link to clipboard
Copied
Roger, thanks!
Copy link to clipboard
Copied
Found another video; went back and edited existing field names, removing spaces. New field names:
MDLTOTALAMOUNTRow1
AMOUNTTHISPAYMENTRow1
TOTALPREVIOUSPAYMENTSRow1
Still doesn't work...
Copy link to clipboard
Copied
Did you update the formula accordingly?
Copy link to clipboard
Copied
Try...I thought I did. I used the underlines in George's example and it worked. I'm golden! Thanks for jumping in!!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now