3 Replies Latest reply on May 12, 2015 5:11 AM by try67

    ΜΑΤΗ.ΨΕΙΛ

    klothos

      Hello

      I have Text1=44.09

      Textfield1=Text1+10=54.09=55 math.ceil

      i want

      Textfield2=Text1+54.09=98.18=99 math.ceil

      Textfield3=Text1+98.18=142.27=143 math.ceil

      Textfield4=Text1+142.27=186.36=187 math.ceil

      Textfield5=Text1+186.36=230.45=231 math.ceil

      .

      .

      .

      till Textfield250

      Thanks

        • 1. Re: ΜΑΤΗ.ΨΕΙΛ
          try67 MVP & Adobe Community Professional

          You already posted this question. And it's not clear at all what you're asking... Try to explain it a bit more clearly, please.

          • 2. Re: ΜΑΤΗ.ΨΕΙΛ
            klothos Level 1

            For example i want every time to add the value with two decimals from the previus Textfield and then i will use the math.ceil for the result

            Thanks

            • 3. Re: ΜΑΤΗ.ΨΕΙΛ
              try67 MVP & Adobe Community Professional

              You can create a doc-level function that takes two values, adds them, rounds up the result and then return it, and use that method in all of your fields.

               

              It can look something like this:

               

              function myRoundUp(a,b) {

                   return Math.ceil(a+b);

              }

               

              You then call it like this, for example:

              event.value = myRoundUp(+this.getField("Text1").value, 54.09);