Inspiring
September 13, 2024
Answered
One Javascript in PDF Form that I can't get to work
- September 13, 2024
- 3 replies
- 733 views
I have a form with quite a few simple calculations that I have working perfectly but for one calculation that I can't get to work. It's too complicated for me to figure out. It's the script for 'TF64' (TextField64).
The original formula is from an Excel file, and it looks like this:

The translated JavaScript with my substituted PDF text fields (TF#s) looks like this:
(((TF34>0)&&(!TF79)||TF79<1)&&((TF49/TF15)>86.6||!TF49))?86.6:(TF49/TF15))

The section of the PDF form showing the location of the text fields are here:

I'm not a coder at all, but I ran the debugger and this is what it showed for that script:

I'm attaching the PDF form as well. Hopefully someone can guide me through this without too much effort. Many thanks, if so!