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

Community site session details

Session Id : kQqwf+Y6gxRjfEDLzco78y
Power Apps - Building Power Apps
Answered

Separating a string into characters

Like (0) ShareShare
ReportReport
Posted on 20 Apr 2020 08:42:14 by 40

Hi all,

I have an application where I want to generate a check number based on an input. For this, I want to separate a string into characters, use a lookup table to change any letters into an equivalent number, then do some maths to generate a check number.

 

My question is, how do I separate the string into its individual characters? There's no separator such as commas to use the split function. This is simple to do in traditional programming languages, just using a for loop to step through the string. Does PowerApps have an equivalent solution? 

 

Thanks. 

Categories:
  • Bovi Profile Picture
    40 on 21 Apr 2020 at 11:20:34
    Re: Separating a string into characters

    @v-xida-msft 

    For my second problem I got it with (Last(FirstN(Split(TextInput6.Text, ""),1)).Result)

     

    Thanks again 🙂 

  • Bovi Profile Picture
    40 on 21 Apr 2020 at 08:10:18
    Re: Separating a string into characters

    Hi @v-xida-msft 

    That worked a treat thank you very much. I would have never thought to use Split with a blank operator. Is there any way to automatically cycle through the rows in the DataTable? I want to be able to apply a formula to each separated number.

  • Verified answer
    v-xida-msft Profile Picture
    on 21 Apr 2020 at 03:04:18
    Re: Separating a string into characters

    Hi @Bovi ,

    Could you please share a bit more about your scenario?

    Do you want to separate a string into individual character in your app?

     

    Based on the needs that you mentioned, I think the Split function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

    4.JPG

    Add a Data Table, set the Items property to following:

    Split("TNC1JM00LBA00000", "")

    then the '00000' string would be separated into individual character within above Data Table.

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Bovi Profile Picture
    40 on 20 Apr 2020 at 09:06:40
    Re: Separating a string into characters

    So the app is to generate serial numbers for machines. and will look something like 'TNC1JM00LBA00000' when it's generated. 

    I have most of the characters separated at the point that they're generated so that fine. It's the final numbers I want to separate out into separate variables (the numbers are stored as a string so that the leading zeros can be displayed correctly, and it can interact with the rest of the serial correctly) so instead of a string containing '00000' I would like to split it into 5 separate characters. Is this even possible in PowerApps? 

  • eka24 Profile Picture
    20,921 on 20 Apr 2020 at 08:58:55
    Re: Separating a string into characters

    Give an example of the text and what you expect

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2