09-17-2020 11:27 AM - last edited 03-31-2023 04:36 AM
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.
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:
Pass in the input values (you can use either one or you can use both!) :
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
You can also responsively size this as needed (based on Height):
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.
- 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
IBAN - an IBAN (International Bank Account Number)
SWIFTBIC - A SWIFT/BIC standardised branch code
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
@iAm_ManCat |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
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.
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
@iAm_ManCat |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
@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 |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
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
@iAm_ManCat |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |