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 Apps / Split or Distinct Numb...
Power Apps
Answered

Split or Distinct Number with differentiator number

(0) ShareShare
ReportReport
Posted on by 943

Hi all..

I want to distinct a number row that i get from a barcode scanner, the problem is shown below:

 

Example case:
0188445051546172202810K1527906
24088445051546172202810K1527906


What should i do to distinct it into these numbers:
Part 1 = 88445051546
Part 2 = 22028
Part 3 = K1527906

The differentiator is in the bold one, 01 or 240, 17, 10

 

Also, can i do it with variable instead of a collection?
Please help.

 

Thanks,

pytbyt

Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @PytByt 

     

    Can you try out the below expressions:
     
    If the differentiators will not exist in the returned number, then you can use below expression:
     
    Part1: Set(Part1, Last(FirstN(Split(Substitute(Substitute(Substitute(Substitute(Label7.Text,"01",";"),"240",";"),"17",";"),"10",";"),";"),2)).Result)
     
    Part2: Set(Part2,First(LastN(Split(Substitute(Substitute(Substitute(Substitute(Label7.Text,"01",";"),"240",";"),"17",";"),"10",";"),";"),2)).Result)
     
    Part3: Set(Part3,Last(Split(Substitute(Substitute(Substitute(Substitute(Label7.Text,"01",";"),"240",";"),"17",";"),"10",";"),";")).Result)
     
    In case, the number of characters in the returned string will be same, you can use:
     
    Part1: Set(Part1, Mid(Label7.Text,2,12))
    Part2: Set(Part2, Mid(Label7.Text,16,5))
    Part3: Set(Part3, Mid(Label7.Text,23,8))
     
    You need to replace Label7.Text with the control/field returning the value.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
     
  • PytByt Profile Picture
    943 on at

    Hey @yashag2255 

    I'm so happy to see your reply. It works for my cases.


    Edit:

    Anyhow, what should i do to make it work with Part 2 and 3 is blank?
    For example:

    From this:
    0123456789 or 24023456789
    and
    172202810K1527906

    To this:
    Part 1 = 0123456789 or 24023456789
    Part 2 = Not Exist
    Part 3 = Not Exist

    And

    To This:
    Part 1 = Not Exist

    Part 2 = Not Exist
    Part 3 = 10K1527906

    I have figure out that i have the same problem with this one here and here. Is there any way to read Hexa in powerApps? How?

    Thanks,

    BR.

    PytByt

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard