upcCheckDigit ( upcString )
Calculates UPC code check digit for any length UPC code. NOTE: Requires FMP 18 or later
Be the first to rate this function Log in to vote
Andrew Sasaki - Show more from this author |
upcCheckDigit ( "6927719811693" )
3
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Given a UPC code without a check digit, this will generate the check digit. The formula is:
* Sum of the odd digits - the first, third, fifth, etc. - multiplied by 3
* Sum of the even digits added to the first sum
* The difference between that number and the number rounded up top the nearest multiple of 10 is the check digit
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.