I have this case:
There is a numeric field, which must be filled with 10 numbered ID of the user. I need to have autamatic check of the existance of that ID. The formula is: [(p1 * 2) + (p2 * 4) + (p3 * 8) + (p4 * 5) + (p5) * 10) + (p6) * 9) + (p7 * 7) + (p8) * 3) + (p9 * 6)] % 11 = p10 where p1 is the first digit, p2 is the second etc.
I am new in javascript, so will be very thankfull for your help. Here is what I've tried:
if ((((this.position(1) * 2) + (this.position(2) * 4) + (this.position(3) * 8) + (this.position(4) * 5) + (this.position(5) * 10) + (this.position(6) * 9) + (this.position(7) * 7) + (this.position(8) * 3) + (this.position(9) * 6)) % 11) == this.position(10))
{
}
else
{
xfa.host.messageBox("Wrong ID", "ERROR!", 1, 0);
}