2 Replies Latest reply on Mar 21, 2012 5:28 AM by csb102155

    Eliminating Zeros

    csb102155 Level 1

      I have Adobe X Pro and I have created a form in Adobe LiveCycle Designer.  I am building in some calculations and each calculation is predicated on some numbered data entered in a previous field.  For example, CR2 = FR2 + CR1, and CR3 = FR3 + CR2 and so on.  I am using Javascripts for the calculations.  I am wondering if there is a way to hide zeros in all the rest of the fields if there is no number in FR2 or some other calculated field.  I know that in Adobe Acrobat there is a Javascript that can be used to hide zeros, but I have not found one to use in the Javascript in Adobe LiveCycle Designer. Does anyone know of this?


      Thanks for your time.


        • 1. Re: Eliminating Zeros

          Why not in your calculation check for null in FR2 for example, then your run your calc if its not and set the field to null when FR2 is null. Something like


          if ( ! FR2.isNull )
              $.rawValue = FR2.rawValue + CR1.rawValue;
              $.rawValue = null;


          which would set the result field to empty rather than a zero. Setting a fields raw value to null, would basically be saying it has no value at the moment

          • 2. Re: Eliminating Zeros
            csb102155 Level 1

            This worked beautifully - thank you very much.