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 Apps / Separating a string in...
Power Apps
Answered

Separating a string into characters

(0) ShareShare
ReportReport
Posted on 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:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    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.

  • Bovi Profile Picture
    40 on at

    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? 

  • Verified answer
    v-xida-msft Profile Picture
    on at

    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 at

    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.

  • Bovi Profile Picture
    40 on at

    @v-xida-msft 

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

     

    Thanks again 🙂 

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard