Mileage reimbursement form (custom calculation)

I am trying to create a script to custom calculation for a mileage reimbursement form. I have a box titled 'engine miles' and I would like to only by the amount of 2014 de.56 IRS for a refund 'total '. If someone has a formula for this it would be greatly appreciated!

Create a hidden field with this value (remember to use it as default), and then simply use the built-in function of product in the tab calculate to get the result of the multiplication of these two fields. This will make much easier to edit the file in the future, if need be.

Tags: Acrobat

Similar Questions

  • Is it possible to convert excel function if (and a custom calculation script

    Our field staff use many Excel files for project documentation.  Our organization moves for iPad instead of laptops and we found that a PDF file to be filled on-line is a great resource for our staff.  I have created several of these forms that contain multiple lines and I just starting to learn how to write custom calculation scripts.  I have a more complex than most calculation and I don't know if this can be written in script.

    = IF (I6 < 0.7, G6 * 0.8, IF (AND (I6 > = 0.7, I6 < 0.8), G6 * 0.85, IF (AND (I6 > = 0.8, I6 < 0,9), G6 * 0.9, IF (AND (I6 > = 0.9, I6 < = 1,1), G6 * 1, IF (AND (I6 > 1.1, I6 < = 1,2), G6 * 1.1, IF (AND (I6 > 1.2, I6 < = 1.3), G6 * 1.15, of"extra work"))))))

    I6 is OverdepthRow1

    G6 is WithDowelsRow1

    I think I understand how to get started

    var v1 = get.thisField("OverdepthRow1").value;

    var v2 = get.thisField("WithDowelsRow1").value;

    if(v1<0.7) {}

    var result = v2 * 0.8

    Event.Value = result}

    ElseIf (v1 > = 0, 7 - now I don't know what to do!)

    I hope that I used the correct brackets and braces in the right places.

    I appreciate your help and your advice.

    Thank you

    Rhonda

    I'm sorry, I made a mistake with the first two lines. I have corrected a problem but introduced another. They must be:

    var v1 = + getField("OverdepthRow1").value;

    var v2 = + getField("WithDowelsRow1").value;

  • If/Then converted to a custom calculation Script

    Can someone help me convert = IF (A2 - A1 > 0, 0, A1 - A2) in a customized for use in an Adobe form calculation Script?

    Thank you!

    If A1 and A2 are field names, then the custom calculation script might look like:

    (function () {}

    Get the field values as numbers

    var A1 = + getField("A1").value;

    var A2 = + getField("A2").value;

    Set the value of this field

    Event.Value = A2 - A1 > 0? 0: A2 - A1;

    })();

  • Custom calculation script

    Hello

    I have some problems eiditing my custom calculation scripts.

    at present, there are: ColorField ('IncubatorLow', ValidateMinMax ('IncubatorLow', 400, 1000) & & ValidateOrder ('IncubatorLow', 'IncubatorHigh'));

    I want to change it

    If (event.value > = 400 & & event.value < = 1000) event.target.textColor = color.black;

    Else if (event.value > 1001) event.target.textColor = ["RGB", 0.5, 1, 0];

    Else if (event.value < 399) event.target.textColor = ["RGB", 0.5, 1, 0];

    But whenever I save my pdf file, it keeps the old one? Although even I tried to delete, lock and so on?

    Under java script, I can't know what is may be the course?

    Any ideas? Thanks in advance!

    Found under Java Script: ColorField runs by Custom Caluclations a string. But if I do one for example a new java script for CustomColors - and change of ColorFields to CustomColors.
    And then save the pdf file, it always uses the Colorfield?

    Just solved the problem.

    The form field name: IncubatorLow - IncubatorHigh - now, I just called them: IncubatorLowColor - IncubatorHighColor, then change the java script for validationminmax and change the colors for my 'java script' CustomColors.
    Can register with it back to the original script.

    I do not understand why change the field can solve it, but it has

  • As a custom calculation, Min and Max with 2 var?

    Is it possible in a custom calculation form select MIN (var1, var2) but a max of 8000. Any ideas would be greatly appreciated?

    The calculation script could be something like:

    Get the values of fields, as strings

    var s1 = getField("v1").valueAsString;

    var S2 = getField("v2").valueAsString;

    If (s1 & s2) {}

    Event.Value = Math.min (8000, s1 + s2);

    } else {}

    Event.Value = 0;

    }

  • Character limit to the custom calculation Script?

    Hello. I have a document that has a text form field. I want to run a custom calculation script which basically says if field 'Number group' = xxxxxxx, so the 'Group name' field should = ABC company.

    I have a list of almost 575 group numbers and names that I need to put in the script. And I have the script works fine, but I'm guessing that there is a limit of characters for the field script? It doesn't let me put my complete list in there.

    Any suggestions on how to work around this problem?

    Thank you

    Brandy

    Yes, there is a character limit for internal JS Editor. The round it is to use an external, such as Notepad.

    Do go to Edit - Preferences - JavaScript and select "Use the external JavaScript editor" and then select the application you want to use.

    Don't forget, however, that you must close the external file each time that change you it if you want to update in the PDF file.

  • Help with a custom calculation for rounding up/down in Adobe Pro

    Hello!  I've never written a custom calculation, so I'm lost; could someone help me please write one round to high-low a.50/.49 with this field name:

    CreditedTotalLocal + OtherHE

    For example, if the value of this field, which is the result of the function "value is the sum of the (+) of the following fields" on two fields named CreditedXXXXLocalHE and CreditedOtherHE - between 3.0 and 3.49, this field should be 3.0.  If the value is 3.50 to 3.99, the field should show 4.0.

    I'm sure it's very simple, but I've tried some things from this and other forums without success.  Help, please!

    Thanks in advance,

    Kim

    Instead of using the "field is the sum of the following fields:" or him simplified "Field Notation" you need a custom as a calculation script

    function myRound (n, d)
    {
    / * By d. P. story
    http://Math.uakron.edu/~dpstory/acrotex/elementary/rounding.PDF
    */
    n = String(n).replace(/^,$/g,""); "
    d =-1 * d
    var m = Math.pow(10,d);
    n * = m;
    n = Math.round (n);
    n / m =;
    d = ( d > 0 ) ? d: 0;
    n = n.toFixed (d);
    return n;
    }

    var nResult = this.getField("CreditedXXXXLocalHE").value + this.getField("CreditedOtherHE").value;
    Event.Value = myRound (nResult, 0);

    or

    function DoubleRound (nValue, nDec)
    {
    var nResult = Math.round (value * Math.pow (10, nDec + 1)) / Math.pow (10, nDec + 1);
    return Math.round (nResult * Math.pow (10, nDec)) / Math.pow (10, nDec);
    }

    var nResult = this.getField("CreditedXXXXLocalHE").value + this.getField("CreditedOtherHE").value;
    Event.Value = DoubleRound (nResult, 0);

    The above two functions to round the values decimal, myRound use - Dec for the decimal value to be rounded so that the DobuleRound use the positive value for the decimal number or powers of 10 as the 1,000 with the 3 myRound and -3 for DoubleRound.

  • Convert the IF function in the custom calculation Script

    Can someone help me with 'IF(Line7<Line8) Line7, framework8' conversion in a custom calculation Script?

    var L7 = Number(this.getField("Line7").value);
    var L8 = Number(this.getField("Line8").value);
    event.value = (L7		   
  • Custom calculation - multiple if statements

    Hi guys

    I'm stuck with a simple If statement. New to JavaScript.

    I have a text field, drop-down "Gender" field "field" and the text field 'risk '.

    In the 'risk' text field, I need to have a custom calculation script to know if 'Male' > = 45 or female > = 55, risk + 1.

    I currently have the use of this:

    Event.Value = "";

    var a = + this.getField ("Age") .value

    var b = this.getField ("Gender") .value +


    If (a > = 45 & & b = "Male") event. Value = '+ 1'

    ElseIf (a< = 45 & & b = "Male") event. Value = '0'

    If (a > = 55 & & b = 'Female') event. Value = '+ 1'

    ElseIf (a< = 55 & & b = 'Female') event. Value = '0'

    Any help will be appreciated.

    I notice another error. You are attempting to convert the value of sex together with the sign, even if it is not. This generates an error and prevents your working code.

    Here is the fixed code:


    var a = +this.getField("Age").value;
    var b = this.getField("Gender").value;
    
    if (a>=45 && b=="Male") event.Value = "+1";
    else if (a<=45 && b=="Male") event.Value = "0";
    else if (a>=55 && b=="Female") event.Value = "+1";
    else if (a<=55 && b=="Female") event.Value = "0";
    else event.value = "";
    


  • Custom calculation script % help

    What is the custom calculation script to arrive at a percentage of penetration between two fields? Example: 50 / 100 = 50%

    The simple notation of field: field 1 / field 2

    Custom script:

    var v1 = + this.getField ("Field 1") .value;

    var v2 = + this.getField ("Field 2") .value;

    If (v2 == 0) event.value = "";

    else event.value = (v1 / v2);

  • Help custom calculation

    I need help to write a custom calculation.  That's what I need: I have four boxes (Tone4, Tone1, Tone3, Tone2).  Each box is worth its value (ie. If Tone4 is activated, it should give me 4 points).  How can I write a script that will give me the right value for the checkboxs?

    Tone2 Tone1 ToneScore Tone3 Tone4

    x                                                            4

    or

    Tone2 Tone1 ToneScore Tone3 Tone4

    x                                             3

    or

    Tone2 Tone1 ToneScore Tone3 Tone4

    x                               2

    or

    Tone2 Tone1 ToneScore Tone3 Tone4

    x               1

    or

    Tone2 Tone1 ToneScore Tone3 Tone4

    0

    Why these boxes are named differently? If they are part of an exclusive group (that is to say, you should not check more than one at a time) then they should have the same name but different export values. Then, you can simply set the desired values as the values of export for each box and use this code as the custom calculation of ToneScore script:

    Event.Value = this.getField("Tone").value;

    If (event.value is "Off") event.value = 0;

  • Need help custom calculation Script

    I need to make a script are a column of fields based on or no information found in another column of fields is the same or specific text. Please find below the screenshot of what I would like that to be done.

    I would like a sum of all the amounts that had Code A...

    You can use this script as of 'SumOfA ': custom calculation script

    var total = 0;
    for (var i=0; i<=2; i++) {
        if (this.getField("p1TC."+i).value=="Code A")
            total+=Number(this.getField("p1RecIn."+i).value);
    }
    event.value = total;
    

    You can adjust easily to the other field as well.

  • Many forms, even calculations-in any way to expedite the creation of each shape

    I create many forms in adobe pro 9 with the same calculations.  Each form when to convert word to PDF from adobe has only a few calculations.  I have attatched an example, but it's basically height x weight gives you BSA.  BSA x dose/m2 = dose patients.  All forms with have the same calculation, just different drugs.  Someone at - it a way to speed up the creation of forms of ~ 100. =)

    Thanks, Chris

    You can cut paste between Forms and calculations form fields will be copied on.

    You could also write the calculations as a function of document level that has the necessary values to pass as a parameter to the function, and the function returns the result of the calculation. You can insert a form that has these document in another form-level functions and features become functions of the new form document level and you can then delete the inserted pages and keep level document functions.

    The document function could be:

    function {BSA (nHeight, nWeight)
    calculate the index of BSA
    nHeight = Number (nHeight);
    nWeight = Number (nWeight);
    return Math.sqrt ((nHeight * nWeight) / 3600);
    } / / end of function of BSA

    The calculation for the 'low' field could then be:

    Event.Value = BSA (this.getField("height").value, this.getField("weight").value);

  • need a script to custom calculation to calculate the standard deviation

    need a calculation script customized to calculate the standard deviation of 8 rows, it is a form .pdf variable data entry points will be users using this model as a form.

    I can get the average of simple calculation, but struggling with the script for the standard deviation. Any help would be appreciated.

    Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6 Heading 7 8 header Header 9 Header 11
    sample1Row1sample2Row1sample3Row1sample4Row1sample5Row1sample6Row1sample7Row1sample8Row1AveragestdDeviation

    If the formula is not:

    StdDev = sqrt (sum (sampleXRow1 - average) ^ 2 / (n-1))

    But:

    StdDev = sqrt (sum ((sampleXRow1-average) ^ 2) / (n-1))

    If the code should be something like this:

    var avg = Number(this.getField("AverageRow1").valueAsString);
    var sum = 0;
    var n = 0;
    for (var i=1; i<=8; i++) {
        var v = this.getField("sample"+i+"Row1").valueAsString;
        if (v!="") {
            sum+=Math.pow((Number(v)-avg),2);
            n++;
        }
    }
    if (n==0 || n==1) event.value = "";
    else event.value = Math.sqrt(sum / (n-1));
    
  • RoboHelp 10 form with calculations

    In Robohelp 10, can make you a form in Robohelp, free standing, which can include calculations or formulas?  For example, to check an account number is required and the person selects Fail, i.e. that the customer could not verify the account number, the form will then calculate and 2 articles say most need an audit complete?  Don't know where to go to see if we succeed in Robohelp 10.  Any help would be appreciated!

    Hello

    RoboHelp offers some basic settings, but it will do nothing whatsoever to help you with the logic of the form. It simply lets you insert form elements.

    If you need logic, you will need to consider a third-party solution part such as: free with conditional logic and an offshoot web form builder

    See you soon... Rick

Maybe you are looking for