CheckIBAN ( IBAN )
check if given iban number is correct ( EU version )
Average rating: 4.2 (33 votes) Log in to vote
Michael Bijnens freelance developer / |
"LENGTH ERROR"
"COUNTRY CODE MISSING"
"INCORRECT IBAN"
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Michael Bijnens - Junior FileMaker Analyst / Programmer
-------------------------
You can use this custom function to check if the given IBAN number is correct.
Create a calculated field ( e.g. flag_correct_IBAN ) in the same table as your IBAN field. (output of the calculation-field has to be TEXT ).
HOW IT WORKS :
-------------------------
e.g.:
1) given IBAN : BE55000311190144
2) first 4 to the end : "000311190144" & "BE55"
3) convert each letter ( B & E ) to digits. ( A = 10 ; B = 11 ; ... Z = 35 )
4) converted : 11 & 14
5) stich it : "000311190144" & "11" & "14" & "55" = 000311190144111455
6) Mod ( IBAN ; 97 )
7) if result = 1 than its a correct IBAN number
Comments
wwdto, Munich Feb 17, 2014 |
||
CAUTION! this Version this custom function does not work correct, it returns other values than 1 for correct IBANS from DE AT; CH and IT. Thats what I have tested. | ||
Michael, Belgium Feb 17, 2014 |
||
Thats correct. The Custom Function is only tested for Belgian IBANS. I haven't tested IBANS from abroad. I will repost is it if I have time to find out how it works. Greets Michael. |
||
wwdto, munich Feb 17, 2014 |
||
Thanks for your response. You can rename your function to CheckIBAN_BE(IBAN) and nobody will expect another result. If you touch it: Would be fine if also length for the chosen country is checked. So this function could be used for input-testing. Ideal would be an Error-code as return value, e.g 1=ok, 2=length-error, 4=special Charakter in IBAN etc. We already had this: a IBAN was copied from another application into a FileMaker field (WIN), nothing to see, nothing worked, hard to find out. Greetings Wolfgang |
||
Michael, Belgium Feb 17, 2014 |
||
Changed it to an EU version. added: check_length ( check if the length of IBAN number is correct with the given country code ). outputs: 1 = correct iban ; missing country code = if country code is missing it won't be able to check length ) ; incorrect iban = the length is correct but the number is incorrect ; length error = the length of IBAN is incorrect. Grtz Michael |
||
Arjen van der Ree, Amsterdam Apr 9, 2014 |
||
Hi Michael, your solution does not seem to handle dutch bans correctly, probably because those have 2 sets of letterblocks (e.g. NL75INGB0005151989 ). Perhaps something you could look into? With Regards, Arjen van der Ree Maxperts Amsterdam, the Neighbors (Netherlands) |
||
claude pirlot, Brussels Nov 1, 2015 |
||
Thank you very much for the IBAN Checker Have a great week |
||
Christoph Kaufmann, CLK.ch Apr 13, 2016 |
||
The functions says IBAN INCORRECT when it actually is correct: IT06 A081 4034 5200 0000 9060 829 Reason: the function assumes there are but two letters in any IBAN (Position 1 and Position 2). Any IBAN with more than these two letters are wrongly valuated as false. You have to convert every letter into a number. There's an example in http://www.briandunning.com/cf/988 |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.