pehrlabel Posted September 27, 2007 Posted September 27, 2007 hello everyone, if i had a field that contained 11 digits, how would i write a new calculation field that would make this checksum, and create a new 12-digit number with this checksum as the last digit? this is for our UPC codes in our database. right now we are looking up the checksum manually on the internet. we'd rather have filemaker do it. I've found the formula below, but i don't know how to write it in a calculation. Thanks!!! adam "the checksum in UPC-A is standard modulo 10 calculation: 1. Add the values of the digits in positions 1, 3, 5, 7, 9, and 11. 2. Multiply this result by 3. 3. Add the values of the digits in positions 2, 4, 6, 8, and 10. 4. Sum the results of steps 2 and 3. 5. The check character is the smallest number which, when added to the result in step 4, produces a multiple of 10. Read about UPC-A at http://www.mecsw.com/specs/upc_a.html"
eos Posted November 15, 2007 Posted November 15, 2007 (edited) Hi, just came across your post. In case you didn't get an answer by now, here's a quick & dirty (& hopefully proper working) solution. Have a look into the field definition, and you'll see your 5-step description converted into a 5-step formula. Let () is quite helpful for this sort of stuff... Best regards from Munich, Bavaria Oliver UPCA_checksum.fp7.zip Edited November 15, 2007 by Guest
Recommended Posts
This topic is 6279 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now