Brian Dunning's FileMaker Custom Functions

ISBN13 ( ISBN )

Converts an old ISBN number to the new ISBN13 format.

  Average rating: 4.1 (34 votes) Log in to vote

Rolf Clausson   Rolf Clausson
Mallverkstan
http://www.filemakerbloggen.se

Share on Facebook Share on Twitter

  Sample input:
ISBN13 ( "91-44-04236-1" )
  Sample output:
"978-91-44-04236-7"

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

Converts an old ISBN number to the new ISBN13 format.

 

Comments

david   david, Melbourne
Jun 13, 2015
Useful thank you, but now amazon have changed their rules again, and I can no longer NOT provide an ISBN10, but must provide a 13, along with a 10.

Nuisance for books published recently.

Can you do a conversion script for ISBN13 to 10 ?
 
PRob   PRob, NY
Apr 5, 2018
Let (
[
$ISBN_noHyphen = Substitute ( ISBN ; "-" ; "" ) ;
$ISBN_stripCheck = Left ( $ISBN_noHyphen ; 12 ) ;
$ISBN_stripLead = Right ( $ISBN_stripCheck ; 9 ) ;
$weightage = ( Middle ( $ISBN_stripLead ; 1 ; 1 ) * 10 ) +
( Middle ( $ISBN_stripLead ; 2 ; 1 ) * 9 ) +
( Middle ( $ISBN_stripLead ; 3 ; 1 ) * 8 ) +
( Middle ( $ISBN_stripLead ; 4 ; 1 ) * 7 ) +
( Middle ( $ISBN_stripLead ; 5 ; 1 ) * 6 ) +
( Middle ( $ISBN_stripLead ; 6 ; 1 ) * 5 ) +
( Middle ( $ISBN_stripLead ; 7 ; 1 ) * 4 ) +
( Middle ( $ISBN_stripLead ; 8 ; 1 ) * 3 ) +
( Middle ( $ISBN_stripLead ; 9 ; 1 ) * 2 ) ;
$checkDigit = Mod ( 11 - Mod ( $weightage ; 11 ) ; 11 )
] ;
Middle ( ISBN ; 5 ; 12) & If ( $checkDigit = 10 ; "X" ; $checkDigit )
)
 

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.

Under construction. Email me your wish list for improvements.