Announcement

Collapse
No announcement yet.

Calculate Check Digit

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculate Check Digit

    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.
    Last edited by gamer99; 03-10-2014, 09:32 AM.

  • #2
    perhaps this link will help you out: http://www.eclectica.ca/howto/modulus-11-self-check.php
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Thanks for the reply. I will check it out.

      Comment


      • #4
        I looked into the link, thank you.

        What im looking for is basically this:
        http://www.calculatorsoup.com/calcul...ngdivision.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.
        check-digit.png

        Comment


        • #5
          10*7909020+(7909020 % 7) this you mean?

          Comment


          • #6
            Originally posted by rr View Post
            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.

            Comment


            • #7
              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
              Last edited by jsbinca; 03-19-2014, 10:01 AM.

              Comment


              • #8
                Oh. I totally misunderstood what rr was saying. Thank you both.

                Comment

                Working...
                X