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 :
Power Platform Community / Forums / Power Automate / Convert string to inte...
Power Automate
Unanswered

Convert string to integer without rounding - IBAN Check

(1) ShareShare
ReportReport
Posted on by 18
Hi,
 
I want to validate IBAN numbers. The steps I take in Power Automate are the following:
  • I get an IBAN number, for example: BE68 5390 0754 7034
  • I chop everything up: substring(...)
  • I replace the letters with their number values 111468 5390 0754 7034
  • I do the reordering :  concat(part1, part2, par3): 5390 0754 7034 11 14 68
Now the final step is the modulo 97 on the result, the problem however is the following:
  • Because of the concat() I used earlier my 'number' actually is a strig value
  • mod() expects an integer
  • if I do the following: int(539007547034111468), Power Automate returns me: 539007547034111500, which is a rounded version of the initial value. This limitation is described here: Power Automate: int Function - Manuel T. Gomes. This rounded version does not allow met to do the modulo 97 as the input is different.
So what I need is either a way to convert large number strings to integers in Power Automate,  a way to concatenate integers without returning me a string value or just a completely other way to validate IBAN numbers.
 
Any advice?
 
 
 
 
Categories:
I have the same question (0)
  • Jurbe48 Profile Picture
    18 on at
    ***UPDATE***
     
    I took a different approach:
     
    • Took the strig: 539007547034111468
    • Split it in two parts: 53900754703411 and 1468
    • Converted both of them to integers: int(53900754703411) and int(1468)
    • Added them together by multiplying the first part with 10000 and then using the add() function: add(539007547034110000, 1468)
     
    But again this didn't work as the add() function also has a character limitation (https://manueltgomes.com/reference/powerautomate-function-reference/add-function/) I again got this result: 539007547034111500
  • Suggested answer
    w.p Profile Picture
    8,339 Super User 2025 Season 2 on at
    That's a limitation—try using AI assistance with AI Prompt.
  • w.p Profile Picture
    8,339 Super User 2025 Season 2 on at
    Without any calculation, the number is automatically converted, even in Excel.
     
     
  • Jurbe48 Profile Picture
    18 on at
    @w.p, thanks for your suggestion. Unfortunately I don't have access to AI builder credits.
  • w.p Profile Picture
    8,339 Super User 2025 Season 2 on at

    Sorry, I take it back—it's not reliable.

    Unless someone else has a solution, my workaround is using Office Script in Excel, but the file must be stored in OneDrive or SharePoint.

  • w.p Profile Picture
    8,339 Super User 2025 Season 2 on at
    running into another issue, Office Scripts doesn't currently support Big Integer.
  • Suggested answer
    w.p Profile Picture
    8,339 Super User 2025 Season 2 on at
    GOOD NEWS
     
     
     
     
     
    Office Script
    function main(
        workbook: ExcelScript.Workbook,
        numberStr: string,
        divisor: number
    ) {
        let remainder = 0;
        for (let i = 0; i < numberStr.length; i++) {
            const digit = parseInt(numberStr[i]);
            remainder = (remainder * 10 + digit) % divisor;
        }
        return remainder;
    }
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard