Brian Dunning's FileMaker Custom Functions

GTIN_Validate ( GTIN_or_ISBN, Type )

Function to validate barcodes using either the GTIN check digit formula or the older ISBN check digit formula

  Be the first to rate this function Log in to vote

Amy Pearson   Amy Pearson - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
GTIN_Validate ( 10527557954; "UPC" )
  Sample output:
Missing Digit(s)

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Provided a GTIN or ISBN (8 to 18 digits) and an expected barcode type, this function will run the check digit calculation (as explained at https://www.gs1.org/services/how-calculate-check-digit-manually and https://isbn-information.com/the-10-digit-isbn.html) and return one of the following results:

Valid - length matches the expected barcode type, check digit matches
Invalid Prefix - a barcode value was sent with type of ISBN-13, but it does not have one of the two allowed ISBN Prefixes (978 or 979)
Extra Digit(s) - the provided barcode value has more digits than the type should have
Missing Digit(s) - the provided barcode value has fewer digits than the type should have
Invalid - Length could not be checked, but the check digit is not valid

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: