JavaScript in a PDF file that checks the value of a specific field and then make the right calculation.

Hi guys!

Sorry for my English is not my mother tongue.

This is my first time writing here, I just discover the great possibilities of Javascript in PDF files and I'm very excited about it!

I have no experience with Javascript, that's what I would do:

Basically, I need to calculate how many litres of gas is needed to do a specific job in agriculture.

I have a table that looks like this:

Seed: 120 litres/Km

Weeding: 20 litres/Km

Fertilize: 140 litres/Km

I have 3 fields in the pdf file: OPERATION / KM / NECESSARYGASOLINE

I need something like this:

Seed = 120;

Weed = 20;

Fertilize = 140;

IF the OPERATION is 'Seeds' then NECESSARYGASOLINE = 120 * KM;

OTHERWISE, if the OPERATION is 'Weed' then NECESSARYGASOLINE = 20 * KM;

OTHERWISE, if the OPERATION is "Fertilizer" then NECESSARYGASOLINE = 140 * KM;

Is it possible to translate it in Javascript?

Thank you very much for the help! It would be really wonderful!

Yes, it is possible. Use the following syntax:

If (organic == 'Yes' & culture == "Wheat")

Tags: Acrobat

Similar Questions

Maybe you are looking for

  • Windows 7 cannot resolve the ip addresses of domain names

    I have a desktop computer that I built components purchased in a major computer store.  I got this system works well for several months, now.  Recently, however, I met a problem with one of the modules of memory of 2 GB.  I deleted (because it turned

  • Your upgrade to Windows 10 ready

    This message is the only thing in Windows Update. I can't install Windows 10 but when I followed the instructions for "restart now" just, it restarts and comes back (under Windows 7) to the same "your upgrade to Windows 10 is ready" with the button '

  • Windows DVD Maker - a section will not play music

    I used Windows DVD Maker to create a photo slideshow. I downloaded music and for some reason there is a break in the music after the second song. In the end, the last sang the fade in unfinished is not because there are not enough audio files. It wor

  • I have trouble at any time update for Windows 7, what should I do?

    I am running Windows 7 Professional on my laptop, my brother bought me a "Move up Windows 7 Ultimate" Windows Anytime Upgrades. After I received the product key, that's when I realize that this upward movement was made for Windows Home premium, what

  • The user can select manual or automatic, advancing slide?

    HelloI have a very simple project that currently drives slide when the user clicks a Clickbox or shape used as a button. (I've also hidden the PlayBar)I would like to change so that at the beginning of the project, the user is given the opportunity t