AnsweredAssumed Answered

Calculate control sum

Question asked by JohnEriksson on Mar 19, 2013
Latest reply on Mar 20, 2013 by philmodjunk


Calculate control sum


     I need to calculate a control number. As a function.

     Its using the modulus 10 method with the weights 2 and 1. Example:

     860324-0261 this is a 9 digit number with a 10th control number (=1).

     212121 212 factorize with these numbers.

     16,6,0,3,4,4,0,2,12 will give theses results

     1+6+6+0+3+4+4+0+2+1+2 = 29. 9 is the last digit. 10-9=1. Control number is 1. Function would return true, since its correct. If the input number is anything else than 10 digits after stripping away the dash it shall also return false.

     So, with php I would know how to do, but FileMaker functions can't contain loops. Anyone have an idea?