-
1. Re: subtracting cells
try67 Feb 9, 2017 2:36 PM (in response to corriep8998078)As the custom calculation script of "Net Expense A BRow1", enter this code:
event.value = Number(this.getField("Receipt Total ARow1").value) - Number(this.getField("LESS GST A BRow1").value);
-
2. Re: subtracting cells
corriep8998078 Feb 9, 2017 2:48 PM (in response to try67)I've copied and pasted this into my cell, but it's still not calculating.
I've saved the javacript then gone to preview and tested it, but it does not subtract the two cells, the cell stays blank.
Have you seen this before?
-
3. Re: subtracting cells
try67 Feb 9, 2017 2:49 PM (in response to corriep8998078)Don't test it in Preview Mode. Go back to the regular viewing mode of the document and then test it.
I think that scripts don't run in Preview Mode.
-
4. Re: subtracting cells
corriep8998078 Feb 9, 2017 2:57 PM (in response to try67)Sigh....It's not working. Does it make a difference that I'm in windows? I copy and pasted exactly how you have this above...do I need to change anything?
-
5. Re: subtracting cells
try67 Feb 9, 2017 3:07 PM (in response to corriep8998078)No, it doesn't matter what OS you use. I'm also on Windows.
Press Ctrl+J and see if there are any error messages in the console window after you change the value of one of the fields.
-
-
7. Re: subtracting cells
try67 Feb 9, 2017 3:15 PM (in response to corriep8998078)Yes, it looks fine. Can you share the actual file (via Dropbox, Google Drive, Adobe Document Cloud, etc.)?
-
8. Re: subtracting cells
corriep8998078 Feb 9, 2017 3:34 PM (in response to try67)thank you for your help, I'm so new to this I don't even know how to post to the cloud. We are being sent home due to a blizzard. I am very appreciative of all your help with this, I'll have to take it up again on Monday.
-
9. Re: subtracting cells
try67 Feb 9, 2017 3:41 PM (in response to corriep8998078)If you prefer you can email it to me directly to try6767 at gmail.com... Stay safe!