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.
For my second problem I got it with (Last(FirstN(Split(TextInput6.Text, ""),1)).Result)
Thanks again 🙂
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.
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:
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,
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?
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2