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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to ignore letters ...
Power Automate
Answered

How to ignore letters and continue only with numbers

(0) ShareShare
ReportReport
Posted on by 41

Hello everyone,

 

I build a flow which reads out barcodes from documents. Unfortuantly it also reads out QR-Codes and therefore I need to eliminate all outputs with letters.

AnOO82_0-1687419125192.png

 

I tried an filter array but I got the error: 

'The template language function 'less' expects all of its parameters to be either integer or decimal numbers.

 

Does someone can help? Thanks in advance.  

I have the same question (0)
  • ThomasFonn Profile Picture
    273 on at

    Hi @AnOO82 
    If you use the "parse text"-action, you can use a regular expression that matches the barcodes such as

     

    ^\d{5,7}

     

    This expression can be read as follows:

    ^ = start of the line

    \d = digits

    {5,7} = atleast 5 characters, up to 7

    And all these conditions must be met in order for a match

    ThomasFonn_0-1687432013875.png

    Image from Regex101.com of the matches

     

    The ",7" is just there as an example, you can remove it or change it to another digit in case the barcodes lengths differs in the future

     

    Best regards

    Thomas Fonn

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @AnOO82 

     

    Are you trying cloud flow or desktop flow ?

     

     

  • AnOO82 Profile Picture
    41 on at

    Hi Nived, it's power automate cloud flow

     

    Tried the barcode value row, but still don't know how to select all the numbers from the action 'read barcode'

    AnOO82_0-1687452835936.png

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @AnOO82 

     

    So Read barcode Document's output is the json object which u are showing first post ?

     

    right ?

     

  • AnOO82 Profile Picture
    41 on at

    Yes, thanks correct 🙂

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @AnOO82 

     

    could you show me the json output again, just to confirm 

     

    also tell me what you want to remove specifically from it 

  • AnOO82 Profile Picture
    41 on at

    This is the outcome:

    AnOO82_0-1687453787624.png

    now I don't want to split the documents at https:/... oder other outcome bull**bleep**- i only need the numbers e.g. 00561, 00560, 0059... 

  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @AnOO82 

     

    See this sample flow 

     

    Nived_Nambiar_0-1687454470360.png

     

    It is filtering the array and checking if any numbers are there and filters it out

     

    output of filter array would be like 

     

    Nived_Nambiar_1-1687454531518.png

     

     

    Hope this helps !

     

     

  • AnOO82 Profile Picture
    41 on at

    Thanks, that looks much better

    AnOO82_0-1687455461185.png

     

    Now the only problem is, that I really only want the number with 5 digits.

    How can I change the function?

  • AnOO82 Profile Picture
    41 on at

    Adjusted the code to : @And(equals(length(string(item())), 5), equals(isFloat(item()), true)) 

    and it's works 🤗

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard