3 Replies Latest reply on Apr 15, 2014 8:09 AM by try67

    How to pass a function with the same argument multiple times and return values in variables?

    MatLac Level 3

      The problem I have is I created a function which really is some kind of database.  Basically a bunch of:

      if (a.value == "this number"){

      b.value = "this expression";



      Inside the form are 2 dropdown lists that return numerical values which I want to process through that function and put the return value inside separate variables.


      var a = this.getField("OPE003.EVEN.1.MIP");


      var result1 = Mip();


      I tried to overwriting *a* to process the second field


      a = this.getField("OPE003.EVEN.2.MIP");


      var result2 = Mip();


      result1 and result2 are put in an array, joined as a string.

      Doing so, I always get the last processing twice as the final result.


      Can I use a function as a batch processing tool that way?