2 Replies Latest reply on Nov 12, 2015 7:51 AM by mmb5588

    Help with dividing data fields and then the result by a number


      So I need to divide one data field by another data field and then divide the result by 52. I have the first part down with this script:


      // establish variables for the field names for the dividend and divisor.

      var sDividend = ' IPSGoal_Annual ';

      var sDivisor = ' Close_Ratio ';


      // get the value of the divisor field

      var nDivisor = this.getField(sDivisor).value;

      // get the value of the dividend field

      var nDividend = this.getField('sDividend').value;


      // do not change the code below this line

      // clear the result field value

      1. event.value = '';

      // see if we have a non-zero divisor

      if (nDivisor != 0) {

      // we can now divide

      event.value = nDividend / nDivisor;

      } // end division calculation==



      But I can't figure out how to now divide the result by 52. Any help would be more than appreciated! Thank you in advance!!!!  Molly Baker