Validate Dutch Bank number

Version 2

     

    Custom Function

     

    Compatibility
    Creator
    Mac OS X, Windows
    Dick Impens
    FMP 7, 8, 8.5, 9, 10, 11
    Dude Management BV
    Web: Yes
    File Type: None
    Server: Yes
    FileSize: 0 kilobytes
    http://www.dude-management.com

    Description

    It validates a dutch bank account number. This is great for apps that do automatic bank transfers.

     


    Code
    If( Upper(Left (BankNummer ; 1))<>"P"; If( If( Length( BankNummer ) <> 9; ,5 ; (Middle( BankNummer ; 1; 1) * 9 + Middle( BankNummer ; 2; 1) * 8 + Middle( BankNummer ;3; 1) * 7 + Middle( BankNummer ; 4; 1) * 6 + Middle( BankNummer ; 5; 1) * 5 + Middle( BankNummer ; 6; 1) * 4 + Middle( BankNummer ; 7; 1) * 3 + Middle( BankNummer ; 8; 1) * 2 + Middle( BankNummer ; 9; 1) * 1) / 11)- Int( If( Length( BankNummer ) <> 9; ,5 ; (Middle( BankNummer ; 1; 1) * 9 + Middle( BankNummer ; 2; 1) * 8 + Middle( BankNummer ;3; 1) * 7 + Middle( BankNummer ; 4; 1) * 6 + Middle( BankNummer ; 5; 1) * 5 + Middle( BankNummer ; 6; 1) * 4 + Middle( BankNummer ; 7; 1) * 3 + Middle( BankNummer ; 8; 1) * 2 + Middle( BankNummer ; 9; 1) * 1) / 11)) <> 0; "Invalid!" ; "Valid!" );"")

     

    Sample Input

    Sample Output
    123456789

    Valid!

    Developer's Notes

    BankNummer is the field that must contain the Bank Account Number.

     


    FileMaker Inc. provides this content on an “As Is” basis, without any warranty, and subject to the terms of the FileMaker Technical Network Agreement. FileMaker makes no representations and is not liable for any content or related information. You may use the content as part of your own solutions and for your customers, but you may not otherwise publicly distribute any content that you did not submit. ©2009-2011 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.