web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

IBAN & SWIFT/BIC Validator

iAm_ManCat Profile Picture Posted by iAm_ManCat 18,228 Most Valuable Professional

If your company/client pays any company in another country, they will likely use IBAN (International Bank Account Number) when sending money to those accounts.

 

To save your Finance team a lot of hassle in checking and validating these, you can add this component to your forms and Apps to instantly validate and make sure that the account number given to them will work first time, every time.

 

Steps:

After opening and saving the .msapp into your environment, Import the component into your App from that App you saved

 

Insert the component control into your App:

InsertComponent.gif

 

Pass in the input values (you can use either one or you can use both!) :

 

image.png

 

Then all you need is for your user to Type in IBAN and SWIFT values:

( You can test with any of the examples in the collection I've loaded on the OnStart, which come from www.iban.com with additional information from the ISO 13616-1:2007 standard you can view here: https://bank-code.net/iban/country-list )

 

i.e Albania, DZ580002100001113000000570

Barclay's UK SWIFTBIC: BUKBGB22

ComponentInAction.GIF

 

You can also responsively size this as needed (based on Height):

Responsive.GIF

 

 

If you choose not to enter an IBAN Value or a SWIFT/BIC value, then the validator for that Input will not show, ie if you connected it only to the IBAN value, then only that IBAN validator row of the component will show.

 

 

So how does it do this? (in case you are interested)

- The Tick/Cross box is dependent on the value's numeric Modulus by 97.

The formula for this is to move first 4 characters to end of string, then convert all characters to numbers, using A=10, B=11 ... Z=35. Modulus the numeric value by 97. Since PowerApps cannot handle integers of this length, we split the first 9 out, calculate the Mod97 of those, then add it to the beginning of the string, and then next 9 until we have 9 or less characters left. The final modulus should be equal to 1 if it is a valid IBAN number (this is regardless of country, purely numerical and will work for all future IBAN countries)

- The Country checker is based on a Regex check against the ISO 13616-1:2007 standard for that Country

- The SWIFT/BIC checker is also a Regex check, although it is much simpler

 

 

Inputs involved:

IBAN - an IBAN (International Bank Account Number)

SWIFTBIC - A SWIFT/BIC standardised branch code

 

Outputs involved:

IBAN_TRIMMED

- Text Value - this is the 'financial' format of IBAN, removed of special characters, whereas the 'web' format may contain spaces. This can be used as an exported value if you wish to provide cleanup function for IBANs

BBAN

- Text Value - Local Bank account number, derived by removing the first four characters

SWIFTBIC_TRIMMED

- Text Value - The 'financial' format of SWIFTBIC, removed of special characters. 'Web' format may contain spaces.

IBAN_VALIDITY

- boolean value - true/false determined by applying the Modulus97 formula

SWIFTBIC_VALIDITY

- boolean value - true/false determined by Regex check of trimmed string

IBAN_COUNTRY

- Text Value - This is determined by using the Regex check for that country as determined by ISO 13616-1:2007

 

 

Number of Countries validated: 103
(and an additional 20 codes fall under FR, GB, FI, PT, ES countries)

 

I hope you find this useful, I have checked it manually against multiple IBAN codes from each country to ensure that they all validate correctly

😸

 

Categories:

Comments

  • iAm_ManCat Profile Picture iAm_ManCat 18,228 Most Valuable Professional
    Posted at
    IBAN & SWIFT/BIC Validator

    No worries, and it lists in the known limitations for components that they can't be added to forms or galleries - I would put it outside and refer to the controls  and just make it like a popup above or to the side of the form if it were me doing it

  • PMCVieira Profile Picture PMCVieira
    Posted at
    IBAN & SWIFT/BIC Validator

    It is working now, but I cannot add the component inside a card.

    Before I could...

    Can you do it?

    Thanks a lot for your prompt support.

  • iAm_ManCat Profile Picture iAm_ManCat 18,228 Most Valuable Professional
    Posted at
    IBAN & SWIFT/BIC Validator

    @PMCVieira I have updated the downloadable file with a version that's got no errors - I also added a BackgroundColour property so that the component can be put against any existing theming you may have,

     

    Cheers,

    Sancho

  • iAm_ManCat Profile Picture iAm_ManCat 18,228 Most Valuable Professional
    Posted at
    IBAN & SWIFT/BIC Validator

    Yes I imagine all of the enumeration will be wrong and all of the Split functions as those were changed recently to output Value instead of Result as a Table/Column.

    Its on my ToDo list to update this, but let me take a quick look and let you know what needs fixing

  • PMCVieira Profile Picture PMCVieira
    Posted at
    IBAN & SWIFT/BIC Validator

    Hello @iAm_ManCat 

    It is seems that the component gives some errors now, probably in most recent powerapps versions.

    Could you please confirm on your side?

    Thanks a lot, the component is very useful.