Can any one please provide some guidance on calculating a check digit. Basically the number(check digit) will be the remainder left from dividing my value by 7.
Any help would mean a lot.
Can any one please provide some guidance on calculating a check digit. Basically the number(check digit) will be the remainder left from dividing my value by 7.
Any help would mean a lot.
Thanks for the reply. I will check it out.
I looked into the link, thank you.
What im looking for is basically this:
http://www.calculatorsoup.com/calculators/math/longdivision.php
I need to calculate the last digit of the value and attach it to the value before saving that value.
so 7909020 would become 79090200 after division by attaching the remainder (0) at the end after dividing by 7.
10*7909020+(7909020 % 7) this you mean?
I want to have a form with a field on it.
Here the user will enter the first 7 digits on the number.
Then I want to divide that number by 7 and get the remainder. This can be done when the user clicks a ‘check’ button.
The remainder will be attached at the end of the 7 digits.
This will help confirm that the digits entered are indeed correct.
That’s exactly what rr suggested.
Here is the long way.
Control app with 2 fields, aah for god’s sake make it 3.
{number}, {rem}, {combi}
onValidate
{rem} = {number} % 7;
{combi} = {number}.{rem}; // or as by rr {combi} = {number} * 10 + {rem} or {combi} = {number} * 10 +({number} % 7)
jsb
Oh. I totally misunderstood what rr was saying. Thank you both.