Error: arithmetic over / underflow - divided by zero?

Hello

IM newbie on Adobe LiveCycle. Ive was able to create a form and now I tried to make some calculation about it.

All right, the pdf is the calculation, but Im getting an error, because I understand that I'm trying to calculate with the classified, those that are empty - no need to register again as a field of zero = > divide by zero...?

Can someone please help me, how to write the formula to get no errors?

My actual formula is:

pod11. RawValue = (((pod2.rawValue * (pod8.rawValue / 100)) - pod6.rawValue) / pod2.rawValue) * 100

Thank you very much for the help!

K.

Hello

to avoid errors to the breast to calculate that each field to ensure there is no rawValue is equal to null, you need to check...

If you use formcalc, use "<>" or "no" to specify not equal to

If you do not use javascript, use «!» = « ou » ! ==' to specify not equal to

JavaScript

If (pod2.rawValue! = null & pod8.rawValue! = null & pod6.rawValue! = null) {}

pod11. RawValue = (((pod2.rawValue * (pod8.rawValue / 100)) - pod6.rawValue) / pod2.rawValue) * 100;

} else {}

pod11. RawValue = null;

}

FormCalc

If (pod2.rawValue <> null & pod8.rawValue <> null & pod6.rawValue <> null) then

pod11. RawValue = (((pod2.rawValue * (pod8.rawValue / 100)) - pod6.rawValue) / pod2.rawValue) * 100

on the other

pod11. RawValue = null

endif

I hope this will help you!

Tags: Adobe LiveCycle

Similar Questions

  • I just upgraded to 10 Windows and now I can't get into Photoshop Elements.  I get the error 150:30.  Set to zero, as suggests, does not, of course.

    I just upgraded to 10 Windows and now I can't get into Photoshop Elements.  I get the error 150:30.  Set to zero, as suggests, does not, of course.

    Thanks - I thought that this could be the best answer!  I just hope that, in general, PSE 8 works with W-10!

  • Divide by ZERO error.

    Hello
    I need a little help. I get divsor is equal to 0 error on the two 6i devloper and oracle pl/sql report writer
    In the report designer, I have a column of formulas with the following:

    Return ((:-: / b): a) * 100;

    What is a simple way around the divide by 0 error?
    Thank you.

    Make sure that: a is always greater than 0, otherwise do not run the formula.

    if :a > 0
    then
       return ((:a - :b)/:a) *100;
    else
       return 0; -- or whatever you want
    end if;
    
  • My speakers to the stopped working. Them are the Logitech speakers to a laptop. When I turn on my laptop, I get a message that says the following. Error 0701: over-current usb on HC/Port-Bus: ooh Dev1dh Fun: 024 / Port: 01 h

    Logitech speakers no longer work on my laptop. I need help. I have windows vista home, I had these speakers for over a year and now they do not work.

    Hi Rickdm,

    This error occurs when you have a USB device or USB port problem.

    You can try to remove the speakers, restart the computer and check what is happening.

    If possible, try to connect another audio device in the computer. Try a pair of speakers to ensure that the problem is not related to the different sound device.

    Determine whether you can hear sound. If you can hear the noise, there is a problem with the audio device.

    This also happen if the usb port is damaged, try with a different usb port. If it still doesn't work do not, contact manufacturer as it is a hardware problem.

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Mike 11 error: Floating Point of Division by zero error

    I use Windows 7 for running software MIKE11 . I used the same software to simulate the model in another Windows 7 PC operated and it worked correctly. But when I want to use the software in the PC, it returns me the error each time. How can I solve the problem?

    'Division by zero' errors are triggered by the application, not by Windows. You must ask the supplier for advice.

  • Financial information - divide by zero by a number &gt; 0?

    I have a set of reports that divide a cell in column A total in column A (example, what is the percentage of the total sales is cool?). There are times when the numerator is 0 (zero) and the denominator (total sales) is greater than 0 (zero). In this case, I get a value of the denominator (total sales). ... Is my question there a way of essentially saying "If the numerator (charges) is 0 (zero) then also do the math of 0 (zero).

    try to use an If then statement with nested inside eval to do what you ask.

    If (A = 0, 0, eval(A/Z))

    A is the cell of numerator, Z is the denominator.

  • Divide by zero problem

    Why n %3 or n MOD 3 return "Division by zero is not allowed.", if n == 0? (3 may be a number any).

    Using CF 9,0,1,274733

    Doug

    Used with numeric values actual/double modulo operator doesn't make much sense from a point of view of math in the first place because it is really intended to provide you with the remainder after integer division.

    ColdFusion still allows you to do this, but if the right hand side of the operator modulo is a numeric value real/dobule it will simply ignore the fractional part. In your case, it will be 3 MOD 0-> so division by zero error.

    This particular behavior is actually documented in the CF documentation as such.

    See you soon

    Kai

  • How can I fix "windows exception int divide by zero.

    I uninstalled the game, then bought - same problem.

    This bx keeps coming back

    Please tell us the name of the game?

    The error occurs during installation or when you try to open the game?

    Check that the game is Windows Vista compatible and that your computer meets the minimum system requirements for the game.

  • Video hardware error, occurring over and over again.

    I'm been a problem with the error material video and bluescreens (doesn't show bluescreen, display just shuts off and I have to force close it down) on my laptop Fujitsu SH560 running with Nvidia Geforce 310 M (support drivers for computer laptop fujitsu last was 309,8).

    I used to have face this problem also, windows update installed a newer version (which is not compatible) but after fixed 309,8 reinstalling several times. However this keeps happening right now even with the correct driver and even after a clean and all installation version. Need some help here?

    Hello

    Thanks for posting your question on the Microsoft community.

    Thank you for details on the question and your efforts to solve.

    This problem may occur because of the corrupt RAM or incompatible drivers.

    I suggest you uninstall and reinstall a previous version of the display driver and check.

    To uninstall the driver, please follow these steps:

    a. press Windows + R keys, type devmgmt.msc in the run window and press ENTER.

    b. Click to enlarge graphic cards, right-click on the map and click Uninstall.

    c. restart the computer.

    Now, reinstall a previous version of the driver to display this link:
    http://www.Fujitsu.com/downloads/COMP/fpcap/Drivers/Driver/VideoN/Nvidia11/v259.04_W7-64/VideoN_NvidiaN11_v259.04_W7-64.exe

    Please also run 'Windows memory diagnostic tool' to correct any error in memory (RAM).
    Refer to this article:
    Diagnosing memory problems on your computer
    http://Windows.Microsoft.com/en-us/Windows7/diagnosing-memory-problems-on-your-computer

    It may take several minutes for the tool finished check the memory of your computer. Once the test is completed, Windows will restart automatically. If the tool detects errors, contact your computer manufacturer for more information on setting, because the errors indicate memory usually only a problem with the memory chips in your computer or other hardware problem.

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • Compile the creation of the error function, over and over again

    I don't see anything wrong with this function. Everything I run with SQL Developer I get a compile error, I try to fix that and get five more who have no sense. All "inappropriate" generic syntax errors

    There is something terribly wrong with my function? I have re-written so several times, I think that I did nothing, but tried to slip in with the DB knowing, which is not me to get anywhere.

    I shows the log of compiler errors, but as I said, he continues to change and add an error with any change to the function

    Any ideas? At this point, I think Developer SQL (for Mac) is just smoked. I often force quit
    CREATE OR REPLACE FUNCTION emp_status
         (emp_first IN VARCHAR2, 
         emp_last IN VARCHAR2,                        
         emp_num IN NUMBER,
         staff_id IN NUMBER
         staff_rank IN VARCHAR2)                     
         
    RETURN VARCHAR2 
    
    IS  
         emp_information VARCHAR2(80) := emp_first || emp_last || ' has a rank of ' || staff_rank);          
        
              
    BEGIN
    
    SELECT employees.e_first, employees.e_last, staff.e_id, staff.s_rank
    INTO emp_first, emp_last, staff_id, staff_rank
    FROM Employees, Staff
    WHERE employees.e_id = staff_id;
    
    RETURN emp_information; 
    END;
    tables
    -- Create tables 
    CREATE TABLE EMPLOYEES
    (e_id NUMBER(1),
    e_first VARCHAR2(20),
    e_last VARCHAR2(20));
    
    CREATE TABLE STAFF
    (s_id NUMBER(3),
    e_id  NUMBER(1),
    s_phone VARCHAR2(10),
    s_rank VARCHAR2(8));
    
    -- Insert into tables
    
    INSERT INTO EMPLOYEES VALUES
    (1, 'Holly', 'Foster');
    
    INSERT INTO EMPLOYEES VALUES
    (2, 'Robert', 'Combs');
    
    INSERT INTO EMPLOYEES VALUES
    (3, 'Harvy', 'Lambert');
    
    INSERT INTO EMPLOYEES VALUES
    (4, 'Sarah', 'Miller');
    
    
    INSERT INTO STAFF VALUES
    (001, 1, '9992221234', 'ADMIN');
    
    INSERT INTO STAFF VALUES
    (023, 2, '9992226789', 'SEC');
    
    INSERT INTO STAFF VALUES
    (006, 3, '9992223456', 'TECH');
    
    INSERT INTO STAFF VALUES
    (011, 4, '9992223535', 'HR');

    Your function does not much sense in my opinion.

    You have these variables to input emp_ * and staff_ * that you concatenate in an emp_information of VARCHAR2.

    Then you try to SELECT those variables based on the query in the function (which is not allowed by the way) entry.

    You probably want something like this I guess:

    CREATE OR REPLACE FUNCTION emp_status (staff_id IN NUMBER)
    RETURN VARCHAR2
    IS
            emp_information VARCHAR2(80);
    BEGIN
            SELECT employees.e_first || employees.e_last || ' has rank of ' || staff.s_rank
            INTO    emp_information
            FROM    Employees
            ,       Staff
            WHERE   STAFF.S_ID = staff_id
            AND     EMPLOYEES.E_ID = STAFF.E_ID; 
    
            RETURN emp_information;
    END;
    

    Your original code does not include a JOIN with the STAFF table I added.

    However, in reality you do not have a function at all. you could just do the following:

    CREATE VIEW EMP_INFORMATION_VW AS
            SELECT  staff.s_id
            ,       employees.e_first || employees.e_last || ' has rank of ' || staff.s_rank AS     emp_information
            FROM    Employees
            ,       Staff
            WHERE   EMPLOYEES.E_ID = STAFF.S_ID;  
    

    Then, you could do:

    SELECT EMP_INFORMATION FROM EMP_INFORMATION_VW WHERE S_ID = :STAFFID
    

    HTH!

  • ERROR: could not insert a value zero in the table. &lt; nom_de_colonne &gt;

    Hi all

    I am facing the problem as follows:

    I've had several columns in the table "transaction".
    the table consists of columns

    transaction_id (PK)
    username (FK)
    equipment (FK)

    The form is made up of 3 columns,
    I would like to have username automatically shown as a text that is displayed by mapping to app_user.

    However, the value is treated as a null value when I tried to insert in the transaction of the table.

    the error is as follows:

    ORA-01400: cannot insert NULL into ('ITEMS'. "OPERATION '." ("" USERNAME ")
    Cannot process the TRANSACTION table row.

    I post in this thread
    app_user
    but I'm not able to solve the problem too, please advice.
    It is very urgent for me.

    Thanks in advance.

    Hello

    If you don't want the user to be able to change it and you want according to the value on the current user name, edit the item and:

    1 set the type: display text (State record)

    2 assign the default value: APP_USER

    3. set the default value Type: PL/SQL Expression

    4 - Set the Source: always, replacement of value that exists in session state

    5 set the Source Type: database column

    6. set the value of the Source or the expression to: username

    Andy

  • Trouble getting a past more arithmetic / underflow error

    Thanks in advance to anyone who can help. I read a few forum posts to get on an error on a form of LC Designer for arithmetic / excess of precision that occurs if a user has not filled a field yet, so the calculation tries to divide by zero. I applied a JavaScript (below) that has worked for me on all areas, I needed it, except for one and I can't figure out what I did wrong.

    I am trying to determine a Ratio prepared value. I was able to correctly calculate the field using FormCalc, written following code on my field named "Asset1LVR": calculate event

    Page4.TotalPropertyTable.row2.PPROwing/page4. TotalPropertyTable.row2.PPRValue * 100

    It's nice and all, but if the user has not yet filled the "PPRValue" field, then more arithmetic / overflow error occurs because the value of PPRValue is null.

    I've been using a script like this one below on other parts of my form where I had the same problem, and the code below works like a charm. For some reason I can't get this code to work with my loan to value Ratio scenario. It does not produce what anyone in the field "Asset1LVR" at all, so does seem to do nothing.

    What I use, writes on the calculate event of 'Asset1LVR' and the language is set to Javascript:

    If (Page4.TotalPropertyTable.Row2.PPRValue > 0) then

    Page4.TotalPropertyTable.row2.PPROwing / Page4.TotalPropertyTable.Row2.PPRValue * 100

    endif

    How is the version FormCalc strives to calculate, but JavaScript does not work?

    Any help is much appreciated, thank you.

    I managed to come across the answer in another post, I missed earlier (REPOST - error "arithmetic over/Underflow"). I changed my code to what is stated below and seems to work perfectly. I hope that someone else will find it useful.

    Check for divider having a value and not zero

    If

    (HasValue (Page4.TotalPropertyTable.Row2.PPRValue) and Page4.TotalPropertyTable.Row2.PPRValue <> 0) then

    perform a division

    Page4.TotalPropertyTable.row2.PPROwing

    / Page4.TotalPropertyTable.Row2.PPRValue

    * 100

    on the other

    Displays no results

    ""

    endif

  • Problems with Newton Raphson zero Finder

    Hey all,.

    I am trying to solve an equation with Newton Raphson zero Finder, but I can't get a result out of it, with this data set. It works with other sets of data, that I tried, and I solved this instance of the equation with another program and got the result I wanted (about 20), but for some reason, I have solve difficulties in Labview. I have attached my VI and the data that I use. This is what the formula, entering the Finder VI zero is supposed to look like:
    ((t * ((0.05594 * t + 5.2842) * t + 137.37)) / (1000 *(t+246))) - 1.987512E - 2
    As I said, I get the result I want, when I solve for this specific instance of the formula with another program, so I know that the formula is correct.

    Please let me know if you have an overview

    When you say it looks like the right place for zero, he returned to 19.94484, which seems to be about 20.

    1. connecting an indicator to the Newton Raphson zero error output Finder.vi gives-23021: two function values have the same sign. Automatic error handling does not pick up screws errors that have no deviation of the clusters. This error indicates that the zero is that not between the search terms or there are several zeros in this range.

    2. the default start and end values are 0 and 1. End changing to 100 product the result above. It seems that another zero 246 so that you can't do the limits too far.

    It is often useful to view data. Plot the data and the results of the formulas on the graphs to see what is happening. Using Eval Single-Variable Array.vi I get this:

    Note that it shows two passages to zero.

    Although it doesn't seem to be a problem here, with very large or very small values can lead to digital errors of overflow, underflow or retransmit.  Multiplying your table of spectrum and the initial settings by 1E23 and then later by dividing by the same factor (if necessary) could help avoid such problems.

    Lynn

  • Error: "CHKDSK cannot continue in read-only mode" and "an unspecified error has occurred (766f6c756d652e63 3f1).

    I'm trying to run a CHKDSK on my hard drives. Whenever I try to do "chkdsk C:" or any other volumes (internal or external) invites of high command. I had

    "This type of file system is NTFS.

    Errors found. CHKDSK cannot continue in read-only mode. »
    (That's all I get, nothing in between)

    I have three internal volumes C: D; and E:. Running chkdsk on a volume any returns "CHKDSK cannot continue in read-only mode. Run with / f on C: will check the disk (no error) is restarted. Run/f on any other volume, I had "an unspecified error has occurred (766f6c756d652e63 3f1).
    Has received the same error in recovery mode, safe mode, using the account administrator or UAC disabled.
    Also got same error when you try to chkdsk on all external hard drives.
    I have formatted my E: and ran chkdsk on an empty volume, got the same error.

    Defrag works OK without any problems. External hard disks can be verified (no error and the bad sector) to another computer (win7 pro x 64).
    My external hard drives can be ejected without any problem. But ejection always fail after running "chkdsk /f.

    This computer is win7 pro x 86.
    Installed software: VMWare workstation 7, Microsoft Security Essentials, Visual c# 2010 express, Office 2003, Daemon Tools. DropBox

    Please help me to solve the puzzle.

    Thank you
    Hello

    After some debugging, I found that the ifsutil.dll reported an exception 'divided by zero.
    Finally I found that there is a fix from Microsoft for my netbook CPU (AMD C60).
    A Chkdsk command fails with an error not specified on a Windows Server 2008 R2 or Windows 7-based computer that uses a low frequency CPU AMD
    http://support.Microsoft.com/kb/2502789
    This fix solved my problem.

  • Unexplained error "NaN".

    Hello

    I was changing an existing script to customize for my application.  I'm running into an error that I do not understand:

    "Not enough parameters label were selected.

    See red text in the code below for in such cases.  Thanks for your help.

    ///////////////////////////////////////////////////////////////

    //

    Script of numbering batch (Actions) of the document (e.g., marking)

    by Thom Parker, WindJack Solutions, Inc.  October 2010

    www.windjack.com, www.pdfscripting.com

    Of Adobe Systems Inc., www.adobe.com

    //

    NOTE: This JavaScript code is designed only for use in a

    "" "" Action script (batch sequence). "" "  It will not work

    within a document/form field or script as a script folder level.

    //

    This script displays a popup menu dialog custom for each file operated by Action

    The user enters information on the way in which the numbers of the documents must be applied to the

    pages of a document, for example, position, content, etc..  As well as information on whether or not

    the script must save the file or extract the pages labelled in a separte document

    These parameters are maintained during any of the Acrobat Session.

    //

    A document number is included in the parameters. This number is incremented each time

    a file is operated.

    //

    The options are included to jump the document current and for the abandonment of the sequence of actions

    //

    Custom dialog box created with AcroDialogs of WindJack Solutions, Inc.

    //

    Version 1.4-7/1/16

    Amended by SCS

    Label width

    var nLabWidth = 2000;  //

    Line height

    var nLabLineHeight = 8; //

    If (typeof (global. (DocNumAction) == 'undefined')

    {

    Acrobat JavaScript dialog box

    Created by DialogDesigner of WindJack Solutions

    < CodeAbove >

    var oDocNumTypes = {}

    'Exposure': {Prefix: "[COMPANY NAME] \r\ [FEI #] \r\EXHIBIT \r\[DATE RANGE] [ACRONYM]", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    'Attachment': {Prefix: "[COMPANY NAME] \r\ [FEI #] \r\ATTACHMENT \r\[DATE RANGE] [ACRONYM]", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    "Memo": {Prefix: "[COMPANY NAME] \r\ [FEI #] \r\[INV/SUPV + MEMO DATE] \r\EXHIBIT [ACRONYM]", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    "Sample": {prefix: "[SAMPLE #] \r\[COLLECTION DATE] \r\doc #", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    };

    function DoSetDocNumberFn (dialogue, oDlg)

    {

    var oRslt = dialog.store ();

    var strExample = oRslt ["LPfx"];

    If (oRslt ["so"])

    strExample += oRslt ["DNum"];

    If (oRslt ["PgNm"])

    {

    strExample += eval ("'" + oRslt ["PPfx"] + "" "") + (oDlg.nCurPage + 1) m:System.NET.SocketAddress.ToString ();

    If (oRslt ["PPsf"])

    strExample += 'of' + oDlg.nNumPages;

    }

    Dialog.Load({"ExMP":strExample});)

    DoSetFileName (dialog, oDlg);

    }

    function DoSetFileName (dialogue, oDlg)

    {

    var oRslt = dialog.store ();

    var strFileName As String = "";

    If (oRslt ["SPst"])

    {

    Add the prefix

    strFileName += oRslt ["SŠPR"];

    Add number

    If (oRslt ["DnPr"])

    {

    strFileName += oRslt ["DNum"];

    If (oRslt ["so"])

    strFileName += "_";

    }

    Add the file name

    "strFileName += oDlg.strFileName.replace(/\.pdf/," ");"

    Add number

    If (oRslt ["DnFx"])

    {

    strFileName += oRslt ["Dnum"];

    If (oRslt ["so"])

    strFileName;

    }

    strFileName += ".pdf";

    }

    Dialog.Load({"SvFl":strFileName});)

    }

    < / CodeAbove >

    overall. DocNumAction =

    {

    result: "Cancel."

    DoDialog: function() {return app.execDialog (this);};

    strHorzPos: "PosR."

    nMarginX: "0.5"

    strVertPos: 'PosT',

    nMarginY: "0.5"

    "strLTyp",:

    strBackgroundCol: ['Transparent'],

    "strExmp",:

    strLabelPrefix: '\r ',.

    bIncludeDocNum:true,

    strInitDocNum: "1."

    bIncludePageNum:true,

    "strPageNumPrefix",:

    bPageNumPostfix:true,

    strBoxStateSel: "Fltn."

    strPgRangeSel: "rAll,"

    "strStrtPg",:

    "strEndPg",:

    bSaveWPostFx:true,

    "strSavePrefix",:

    strDocNumInName: "None."

    "strSavePostfix",:

    "strSvFl",:

    {GetRadioSel:function(oRslts,aCtrls)}

    for (var strRtn = aCtrls [0]; aCtrls.length > 0; strRtn = aCtrls.pop ()) {}

    If (oRslts [strRtn] is true)

    Return strRtn;

    }

    Return ' ';

    },

    SetListSel:function(list,path) {return if(path.length == 0);

    eval ("list [------" "+ ((typeof path.join!]") = "function")? {("[(chemin: path.join("\"][\"")) + ' \ '] = 1")},

    {GetListSel:function(oLstRslts,path)}

    for {var (topic oLstRslts)

    If (((typeof oLstRslts[item]=="number") & & (oLstRslts [point] > 0)))

    || This. GetListSel (oLstRslts [item], path))

    {(point) path.push; return true ;}}

    }

    Returns false;

    },

    nCurPage:0,

    nNumPages:1,

    bHidden:true,

    SetDocNumber:DoSetDocNumberFn,

    SetFileName:DoSetFileName,

    strFileName: "Test.pdf"

    oDocNumParams:oDocNumTypes,

    initialize: function (dialog)

    {

    var listLTyp = new Object();

    This. SetListSel (listLTyp, this.strLTyp);

    var listBkgd =

    {

    "Transparent":-1,.

    'Yellow':-1.

    'Green':-1.

    'Blue':-1.

    'Grey':-1.

    };

    This. SetListSel (listBkgd, this.strBackgroundCol);

    var dlgInit =

    {

    'MrgH': this.nMarginX,

    'MrgV': this.nMarginY,

    'Bkgd': listBkgd,

    "DNum": this.strInitDocNum.

    "SPst": this.bSaveWPostFx.

    'Exmp': this.strExmp,

    'LPfx': this.strLabelPrefix,

    "So": this.bIncludeDocNum.

    "PgNm": this.bIncludePageNum.

    "PPfx": this.strPageNumPrefix.

    "PPsf": this.bPageNumPostfix.

    "tFPg": this.strStrtPg.

    "tTPg": this.strEndPg.

    'SŠPR': this.strSavePrefix,

    'Pressure': this.strSavePostfix,

    "SvFl": this.strSvFl.

    };

    dlgInit [this.strHorzPos] = true;

    dlgInit [this.strVertPos] = true;

    dlgInit [this.strBoxStateSel] = true;

    dlgInit [this.strPgRangeSel] = true;

    dlgInit [this.strDocNumInName] = true;

    Dialog.Load (dlgInit);

    () Dialog.Enable

    {

    'tTPg': false,

    'tFPg': false,

    'PPfx': false,

    'DNum': false,

    }

    );

    var typeInit = {};

    (XX in this.oDocNumParams)

    typeInit [xx] = - 1;

    If ((this.strStrtPg == «») | isNaN (this.strStrtPg) |) (((This.strStrtPg) Number > This.nNumPages))

    {

    If (this.bHidden)

    this.strStrtPg = "1";

    on the other

    this.strStrtPg = (this.nCurPage + 1) m:System.NET.SocketAddress.ToString ();

    }

    If ((this.strEndPg == "") |) isNaN (this.strEndPg) | (((This.strEndPg) Number > This.nNumPages))

    this.strEndPg = this.nNumPages.toString ();

    exInit var = {'LTyp': typeInit, "tFPg": this.strStrtPg, "tTPg":this.strEndPg, 'sOfN': ' of ('+ this.nNumPages +') ',}

    "MNLF": "current file:"+ this.strFileName;} '.

    If (this.bHidden & & this.strPgRangeSel == "rCur")

    {

    this.strPgRangeSel = 'rAll;

    exInit ['rCur'] = false;

    exInit [this.strPgRangeSel] = true;

    }

    Dialog.Load (exInit);

    exInit var = {"ExPg":this.strPgRangeSel == "rFro", "DNum":this.bIncludeDocNum, "PPfx":this.bIncludePageNum,}

    "PPsf":this.bIncludePageNum, "MrgH":this.strHorzPos! = "PosC", "MrgV":this.strVertPos! = "PosM,.

    ""SvPs":this.bSaveWPostFx," SvDn ":this.bSaveWPostFx.

    "tFPg":this.strPgRangeSel == 'rFro', ' tTPg":this.strPgRangeSel =="rFro"," rCur"{:! this.bHidden};

    Dialog.Enable (exInit);

    This. SetDocNumber (dialogue, this);

    },

    validate: function (dialog)

    {

    var oRslt = dialog.store ();

    If (oRslt ["so"] & & ((oRslt ["DNum"] == null) |)) (oRslt ["DNum'] == ' ') | isNaN (oRslt ["DNum"])))

    {

    App.Alert ('If selected, the initial value for Doc number must be filled with a valid integer");

    Returns false;

    }

    If ((/^\s*$/).test(oRslt["LPfx"]) & &! oRslt ['so'] & &! oRslt ["PgNm"])

    {

    App.Alert ("not enough label settings have been selected");

    Returns false;

    }

    If (oRslt ["rFro"])

    {

    If ((oRslt [«tFPg»] == «») | isNaN (oRslt ["tFPg"]) |) (oRslt ["tTPg'] == ' ') | isNaN (oRslt ["tTPg"]))

    {

    App.Alert ("If selected, the Page range values must be entered with valid integers");

    Returns false;

    }

    If ((oRslt ["tFPg"]) Number > Number (oRslt ["tTPg"]))

    {

    App.Alert ("" If selected, page number must be less than the number page "");

    Returns false;

    }

    If ((Number (oRslt ["tFPg"]) > this.nNumPages) |) (((ORslt ["tTPg"]) Number > This.nNumPages))

    {

    App.Alert ("" If selected, From and the page numbers must be less than the number of pages "");

    Returns false;

    }

    }

    Returns true;

    },

    commit: function (dialog)

    {

    var oRslt = dialog.store ();

    this.strHorzPos is this. GetRadioSel (oRslt, ["PosL", "PosC", "PosR"]);

    this.nMarginX = oRslt ["MrgH"];

    this.strVertPos is this. GetRadioSel (oRslt, ["PosT", "PosM", "PosB"]);

    this.nMarginY = oRslt ["MrgV"];

    path of var = new Array();

    this.strLTyp = (this. "GetListSel (oRslt ["LTyp"], path))? path.reverse ():" ";" "

    path of var = new Array();

    this.strBackgroundCol = (this. "GetListSel (oRslt ["Bkgd"], path))? path.reverse ():" ";" "

    this.strExmp = oRslt ['Exmp'];

    this.strLabelPrefix = oRslt ["LPfx"];

    this.bIncludeDocNum = oRslt ["so"];

    this.strInitDocNum = oRslt ["DNum"];

    this.bIncludePageNum = oRslt ["PgNm"];

    this.strPageNumPrefix = oRslt ["PPfx"];

    this.bPageNumPostfix = oRslt ["PPsf"];

    this.strBoxStateSel = "Fltn.

    this.strPgRangeSel is this. GetRadioSel (oRslt, ["rAll", "rCur", "rFro"]);

    this.strStrtPg = oRslt ["tFPg"];

    this.strEndPg = oRslt ["tTPg"];

    this.bSaveWPostFx = oRslt ["SPst"];

    this.strSavePrefix = oRslt ["SŠPR"];

    this.strDocNumInName is this. GetRadioSel (oRslt, ["None", "DnPr", "DnFx"]);

    this.strSavePostfix = oRslt ['pressure'];

    this.strSvFl = oRslt ["SvFl"];

    },

    "Abrt": function (dialog)

    {

    Dialog.end ("ABRT");

    },

    'Skip': function (dialog)

    {

    Dialog.end ("Skip");

    },

    'Pressure': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'DnFx': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'DnPr': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'None': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'SŠPR': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    "SPst": function (dialog)

    {

    Good var = dialog.store (["SPst"]);

    Dialog.Enable ({"Pressure": good, "SvDn": good});

    This. SetFileName (dialog, this);

    },

    'tTPg': function (dialog)

    {

    var x;

    },

    'rFro': function (dialog)

    {

    Dialog.Enable ({tFPg:true, tTPg:true, "ExPg": true});

    },

    'rCur': function (dialog)

    {

    Dialog.Enable ({tFPg:false, tTPg:false, "ExPg": false});

    },

    "rAll": function (dialog)

    {

    Dialog.Enable ({tFPg:false, tTPg:false, "ExPg": false});

    },

    'PPsf': function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    'PPfx': function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    'PgNm': function (dialog)

    {

    Buffalo var = dialog.store (['PgNm']);

    Dialog.Enable({"PPfx":bIsOn,"PPsf":bIsOn});)

    This. SetDocNumber (dialog, this);

    },

    "DNum": function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    "So": function (dialog)

    {

    Dialog.Enable({"DNum":Dialog.) Store() ["so"]});

    This. SetDocNumber (dialog, this);

    },

    'LPfx': function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    'LTyp': function (dialog)

    {

    var oRslt = dialog.store ();

    path of var = [];

    cSel var = ((this. GetListSel (oRslt ["LTyp"], path))? path.reverse ():"").toString();

    var oLabInfo = this.oDocNumParams [cSel];

    If (! oRslt ["DNum"] |) (oRslt ["DNum'] == ' ') | isNaN (oRslt ["DNum"]))

    Dialog.Load({"DNum":"1"});)

    If (oLabInfo)

    {

    Dialog.Load ({"LPfx": oLabInfo.Prefix, "So":oLabInfo.UseDocNum, "PgNm":oLabInfo.UsePgNum, "PPfx":oLabInfo.PagePrefix});})

    Dialog.Enable ({"DNum": oLabInfo.UseDocNum, "PPfx":oLabInfo.UsePgNum, "PPsf":oLabInfo.UsePgNum});})

    This. SetDocNumber (dialog, this);

    }

    },

    "PosB": function (dialog)

    {

    Dialog.Enable({"MrgV":true});)

    },

    "POS": function (dialog)

    {

    Dialog.Enable({"MrgV":false});)

    },

    'PosT': function (dialog)

    {

    Dialog.Enable({"MrgV":true});)

    },

    "PosR": function (dialog)

    {

    Dialog.Enable({"MrgH":true});)

    },

    "PosC": function (dialog)

    {

    Dialog.Enable({"MrgH":false});)

    },

    'PosL': function (dialog)

    {

    Dialog.Enable({"MrgH":true});)

    },

    Description:

    {

    name: 'batch labeling automatic Application. "

    elements:

    [

    {

    type: "display."

    elements:

    [

    {

    type: "display."

    alignment: "align_fill",.

    elements:

    [

    {

    type: "display."

    height: 14.

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "MNLF."

    name: ' Please enter information for application document numbering labels,:

    height: 14.

    Police: "palette."

    "BOLD": true,

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "Version 1.4-7/1/16 SCS/CA."

    height: 14.

    alignment: 'align_right ',.

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls2."

    name: "ENTER the INFORMATION LABEL."

    Police: "palette."

    "BOLD": true,

    elements:

    [

    {

    type: "display."

    align_children: "align_row."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta3."

    name: "1. Select the Type of Document:»

    },

    {

    type: "popup",

    item_id: "LTyp."

    nom_de_variable: "strLTyp."

    Width: 93

    height: 23,.

    char_width: 8.

    },

    {

    type: "gap."

    item_id: "gap2."

    char_width: 1,.

    char_height: 4,.

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "2 Select background,:

    },

    {

    type: "popup",

    item_id: 'Bkgd ',.

    nom_de_variable: "strBackgroundCol."

    Width: 86

    height: 23,.

    char_width: 8.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta5."

    name: ' 3 Add the front label information of selected document Type,:

    height: 15.

    },

    {

    type: 'edit_text. "

    item_id: "LPfx."

    nom_de_variable: "strLabelPrefix."

    Width: 200,

    height: 75,.

    Multiline: true,

    char_width: 8.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta6."

    name: ' 4. Enter departure Doc # (default 1): ",

    },

    {

    type: 'edit_text. "

    item_id: "DNum."

    nom_de_variable: "strInitDocNum."

    char_width: 3,.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_row."

    elements:

    [

    {

    type: 'check_box. "

    item_id: 'So,'

    name: "Include Doc # (default)."

    nom_de_variable: "bIncludeDocNum."

    alignment: "align_fill",.

    },

    {

    type: 'static_text. "

    item_id: "sta7."

    name: "Enter prefix (or default) Page,:

    },

    {

    type: 'edit_text. "

    item_id: "PPfx."

    nom_de_variable: "strPageNumPrefix."

    char_width: 8.

    },

    {

    type: 'check_box. "

    item_id: "PgNm."

    name: "Include Page # (default)."

    nom_de_variable: "bIncludePageNum."

    alignment: "align_fill",.

    },

    {

    type: 'check_box. "

    item_id: "PPsf."

    name: ' include \"of N\ 'pages ', '.

    nom_de_variable: "bPageNumPostfix."

    alignment: "align_fill",.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta8."

    name: "overview of the label,:

    Police: "palette."

    },

    {

    type: 'edit_text. "

    item_id: 'Exmp ';

    Width: 250,

    height: 75,.

    char_width: 8.

    Multiline: 'true ',.

    ReadOnly: "true."

    },

    ]

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls3."

    name: "SELECT the PAGE RANGE."

    Police: "palette."

    "BOLD": true,

    elements:

    [

    {

    type: "display."

    align_children: "align_row."

    elements:

    [

    {

    type: 'radio ',.

    item_id: "rAll,"

    group_id: "GRP1"

    name: "All."

    nom_de_variable: "strPgRangeSel."

    height: 20.

    },

    {

    type: 'radio ',.

    item_id: "direct."

    group_id: "GRP1"

    name: "current (applies only to the Open Document)."

    nom_de_variable: "strRange."

    height: 20.

    },

    {

    type: 'radio ',.

    item_id: "rFro."

    group_id: "GRP1"

    name: "to:",

    Width: 12,

    height: 24,.

    },

    {

    type: 'edit_text. "

    item_id: "tFPg."

    nom_de_variable: "strStrtPg."

    height: 24,.

    char_width: 6,.

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "to:",

    height: 24,.

    },

    {

    type: 'edit_text. "

    item_id: "tTPg."

    nom_de_variable: "strEndPg."

    height: 24,.

    char_width: 6,.

    },

    {

    type: 'static_text. "

    item_id: "sOfN."

    name: "of (N)."

    height: 24,.

    },

    ]

    },

    ]

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls1."

    name: POSITION "SELECT."

    Width: 188

    height: 80,.

    Police: "palette."

    "BOLD": true,

    char_width: 8.

    char_height: 8.

    elements:

    [

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'radio ',.

    item_id: "PosL."

    group_id: "PosH,"

    name: "Left",

    nom_de_variable: "strHorzPos."

    },

    {

    type: 'radio ',.

    item_id: "PosC".

    group_id: "PosH,"

    name: 'Center ',.

    },

    {

    type: 'radio ',.

    item_id: "PosR."

    group_id: "PosH,"

    name: "right."

    },

    {

    type: 'static_text. "

    item_id: "sta2."

    name: "margin (inches)": ","

    },

    {

    type: 'edit_text. "

    item_id: "MrgH."

    nom_de_variable: "nMarginX."

    char_width: 8.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'radio ',.

    item_id: 'PosT',

    group_id: 'VPOS ',.

    name: 'Top',

    nom_de_variable: "strVertPos."

    },

    {

    type: 'radio ',.

    item_id: "POS."

    group_id: 'VPOS ',.

    name: "Middle",

    },

    {

    type: 'radio ',.

    item_id: "PosB"

    group_id: 'VPOS ',.

    name: "bottom."

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "room (inches):»

    },

    {

    type: 'edit_text. "

    item_id: "MrgV."

    nom_de_variable: "nMarginY."

    char_width: 8.

    },

    ]

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls1."

    name: 'SAVE OPTIONS ',.

    Police: "palette."

    "BOLD": true,

    alignment: "align_fill",.

    elements:

    [

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'check_box. "

    item_id: "SPst"

    name: "save file."

    nom_de_variable: "bSaveWPostFx."

    },

    {

    type: 'static_text. "

    item_id: "sta9."

    name: "Enter Doc Type of recorded file name (optional):"

    },

    {

    type: 'edit_text. "

    item_id: "SŠPR."

    nom_de_variable: "strSavePrefix."

    Width: 73

    height: 23,.

    char_width: 8.

    alignment: "align_fill",.

    },

    {

    type: 'static_text. "

    item_id: "sta3."

    name: "Include Doc # in the name of the saved file (optional):"

    },

    {

    type: 'radio ',.

    item_id: "None."

    group_id: "SvDN."

    name: 'no ', he said.

    nom_de_variable: "strDocNumInName."

    },

    {

    type: 'radio ',.

    item_id: "DnPr."

    group_id: "SvDN."

    name: '' Yes. ''

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    alignment: "align_top."

    elements:

    [

    {

    type: "ok."

    ok_name: 'Apply Label and save',

    },

    {

    type: 'button ',.

    item_id: 'Skip,'

    name: 'Skip this Doc. "

    },

    {

    type: 'button ',.

    item_id: "Abrt"

    name: "Cancel."

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "" file name: ","

    alignment: 'align_right ',.

    },

    {

    type: 'edit_text. "

    item_id: "SvFl."

    Width: 295

    height: 23,.

    char_width: 8.

    ReadOnly: "true."

    },

    ]

    },

    ]

    },

    ]

    },

    ]

    }

    };

    overall. DoPlaceDocNumbers = app.trustedFunction (function (oOrigDoc)

    {

    app.beginPriv ();

    Setup from the parameters

    var oTrgDoc = oOrigDoc;

    var nPgStart, nPgEnd, nPgTrgStart;

    var cBkCol = ["t."];

    switch (global. DocNumAction.strBackgroundCol.toString ())

    {

    case 'Transparent ':

    cBkCol = ['t.'];

    break;

    case "yellow":

    cBkCol = ['RGB', 1, 1, 0];

    break;

    case "green":

    cBkCol = ['RGB', 0.1, 0];

    break;

    case "Blue":

    cBkCol = ["RGB", 0,0, 1];

    break;

    case "gray":

    cBkCol = ['RGB',.7,.7,.7];

    break;

    case "white":

    cBkCol = ['RGB', 1, 1, 1];

    break;

    }

    switch (global. DocNumAction.strPgRangeSel)

    {

    case 'rAll:

    nPgTrgStart is nPgStart = 0;.

    nPgEnd = oOrigDoc.numPages-1;

    break;

    case 'rCur ':

    nPgTrgStart = nPgEnd = nPgStart = oOrigDoc.hidden? 0:oOrigDoc.pageNum;

    break;

    case 'rFro ':

    nPgTrgStart = nPgStart = number (global. DocNumAction.strStrtPg)-1;

    If (nPgTrgStart > (oOrigDoc.numPages-1))

    nPgTrgStart = oOrigDoc.numPages-1;

    nPgEnd = number (global. DocNumAction.strEndPg)-1;

    If (nPgEnd > (oOrigDoc.numPages-1))

    nPgEnd = oOrigDoc.numPages-1;

    break;

    }

    Start marking loop

    var nNumPages is nPgEnd - nPgStart + 1;.

    var nCurPgNum = nPgStart;

    for (nPg var = 0; nPg < nNumPages; nPg ++ nCurPgNum ++, nPgTrgStart ++)

    {

    Create a text label

    var global = strExample. DocNumAction.strLabelPrefix;

    If (Global. DocNumAction.bIncludeDocNum)

    strExample += overall. DocNumAction.nCurrentDocNum;

    If (Global. DocNumAction.bIncludePageNum)

    {

    strExample += eval ("'" + global.) DocNumAction.strPageNumPrefix + "" "") + (nCurPgNum + 1) m:System.NET.SocketAddress.ToString ();

    If (Global. DocNumAction.bPageNumPostfix)

    strExample += 'of' + oOrigDoc.numPages;

    }

    Find the location on the Page

    Download the base params

    var rcPage = oOrigDoc.getPageBox ("Crop", nCurPgNum);

    var mxToDefaultCoords = (new Matrix2D()) .fromRotated (oOrigDoc, nCurPgNum);

    var nPgRot = oOrigDoc.getPageRotation (nCurPgNum);

    var rcRot = [];

    var nAlign;

    var nMargX = number (global. DocNumAction.nMarginX) * 72;

    switch (global. DocNumAction.strHorzPos)

    {

    case "PosL:

    strAlign = 'left '; Left-aligned text

    rcRot [0] = nMargX;

    rcRot [2] = nMargX + nLabWidth;

    break;

    case "PosC":

    strAlign = 'center '; Left-aligned text

    rcRot [0] = rcPage [2] / 2 - nLabWidth/2;

    rcRot [2] = rcPage [2] / 2 + nLabWidth/2;

    break;

    case "PosR":

    strAlign = 'right '; Left-aligned text

    rcRot [0] = rcPage [2] - nMargX - nLabWidth;

    rcRot [2] = rcPage [2] - nMargX;

    break;

    }

    Find the number of lines

    var nMargY = number (global. DocNumAction.nMarginY) * 72;

    var nLigne = 1;

    var oMtch = strExample.match(/(\n)/g);

    If (oMtch)

    nLigne += oMtch.length;

    var bxHght = nLigne * (nLabLineHeight + 1);

    switch (global. DocNumAction.strVertPos)

    {

    case 'PosT ':

    rcRot [1] = rcPage [1] - nMargY - bxHght;

    rcRot [3] = rcPage [1] - nMargY;

    break;

    case "POS":

    rcRot [1] = (rcPage [1] - bxHght) / 2;

    rcRot [3] = (rcPage [1] + bxHght) / 2;

    break;

    case "PosB":

    rcRot [1] = nMargY;

    rcRot [3] = nMargY + bxHght;

    break;

    }

    var rectAnnot = mxToDefaultCoords.transform (rcRot);

    Find an existing annot and remove if there is

    annot var = oTrgDoc.getAnnot (nPgTrgStart, "DocNumberLabel");

    If (Annot)

    Annot.Destroy ();

    Create annotation

    strExample = strExample.replace(/\r\n/g,"\r");

    oTrgDoc.addAnnot ({type: "FreeText", page: nPgTrgStart, rect:rectAnnot,})

    Rotate: nPgRot, width: 0, fillColor:cBkCol,

    readOnly: overall. DocNumAction.strBoxStateSel == "Lckd."

    richContents: [{textColor: ["RGB", 0,0, 0], textSize:nLabLineHeight,}]

    [{alignment: strAlign, text: strExample}].

    name: "DocNumberLabel."

    });

    }

    If selected then flatten

    If (Global. DocNumAction.strBoxStateSel is "Fltn")

    oTrgDoc.flattenPages ();

    Save file

    If (Global. DocNumAction.bSaveWPostFx)

    {

    var cSavePath = oOrigDoc.path.replace(/\/[^\/]+$/,"/"); "

    var cDocPrefix;

    cDocPrefix = global. DocNumAction.strLabelPrefix;

    Document prefix number

    cSavePath += overall. DocNumAction.strSavePrefix;

    If (Global. DocNumAction.strDocNumInName is "DnPr")

    {

    If (Global. DocNumAction.bIncludeDocNum)

    cSavePath += overall. DocNumAction.nCurrentDocNum += "_";

    }

    "cSavePath += oOrigDoc.documentFileName.replace(/\.pdf/," ");"

    Number of document as prostfix

    If (Global. DocNumAction.strDocNumInName is 'DnFx')

    {

    If (Global. DocNumAction.bIncludeDocNum)

    cSavePath += overall. DocNumAction.nCurrentDocNum;

    }

    cSavePath += ".pdf";

    oTrgDoc.saveAs (cSavePath);

    }

    app.endPriv ();

    });

    }

    var DoNumActionDlg = app.trustedFunction (function)

    {

    app.beginPriv ();

    return app.execDialog (global. DocNumAction);

    app.endPriv ();

    });

    Setup

    var oDoc = event.target;

    If (odoc.xfa)

    {

    If (3 == app.alert (oDoc.documentFileName + ": is a form of LiveCycle, which may not be labeled\n\n you want to continue processing the files?")) (Pressing No. will stop the processing of the file) ", 1, 2))

    Event.RC = false;

    }

    on the other

    {

    overall. DocNumAction.bHidden = oDoc.hidden;

    if(!odoc.) Hidden)

    overall. DocNumAction.nCurPage = oDoc.pageNum;

    on the other

    overall. DocNumAction.nCurPage = 0;

    overall. DocNumAction.nNumPages = oDoc.numPages;

    overall. DocNumAction.strFileName = oDoc.documentFileName;

    cRtn var = DoNumActionDlg();

    If ("ok" is cRtn)

    {

    Configure the Initial of Doc number

    If (Global. DocNumAction.bIncludePageNum)

    overall. DocNumAction.nCurrentDocNum = number (global. DocNumAction.strInitDocNum);

    Console.println ("Do" + oDoc.documentFileName);

    overall. DoPlaceDocNumbers (oDoc);

    Increment if applicable Doc number

    If (Global. DocNumAction.bIncludeDocNum)

    {

    overall. DocNumAction.nCurrentDocNum ++;

    overall. DocNumAction.strInitDocNum = global. DocNumAction.nCurrentDocNum.toString ();

    }

    }

    ElseIf ("Abrt" == cRtn)

    Event.RC = false;

    }

    I suppose it comes from the exchange of shares on AcrobatUsers.com. Are you the error with the unmodified script as well? If this isn't the case, what you changed in the code (and for what purpose)?

    Your subject line refers to an error of NaN - how - what is factor in this problem?

    A 'NaN' error is thrown when occurs a condition 'Not a number', which may for example be that you are trying to perform an operation which cannot be done with a number on a chain, or if you try to divide by zero.

Maybe you are looking for