5 Replies Latest reply on Oct 4, 2017 11:03 AM by Test Screen Name

    How to calculate 0/0 and give 100%

    BergLino Level 1


      Good afternoon.

      I have 04 Text Box where I preform to perform some mathematical operations.
      For example:
      The first calculation is done in Box 3, where I subtract box1-box2 - This is ok.
      Already the Box4, I do the percentage calculation of the division of Box2 / Box1. When I have values, it gives me the result in%. But when I do not have values or all are zero (0), it returns me an error. I wanted a JS code where doing a division of 0/0 would return me 100%. can you help me?

      Oh, I'd like to know if you can do some value counting in a textbox. For example, I have 10 textboxes that should be filled with text. in another textbox, can you create a JS to assign the value of 1 to each filled txtbox and calculate the total amount?