cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BarryCoombs
New Member

Adding Spaces Between Capitalized Words

Hi All, 

 

I am building a PowerApp at the moment and need to split a value in two based on the location of the capital letters. 

The value is a first and last name. Unfortunately, I have no way of splitting this at source as it is stored as a single value. 

 

Ultimately, I want to turn. 

 

BillSmith into Bill Smith. 

 

Any help would be greatly appreciated. 

 

Cheers

 

Barry

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @BarryCoombs ,

 

Please try:

 

Trim(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute("BillSmith","A"," A"),"B"," B"),"C"," C"),"D"," D"),"E"," E"),"F"," F"),"G"," G"),"H"," H"),"I"," I"),"J"," J"),"K"," K"),"L"," L"),"M"," M"),"N"," N"),"O"," O"),"P"," P"),"Q"," Q"),"R"," R"),"S"," S"),"T"," T"),"U"," U"),"V"," V"),"W"," W"),"X"," X"),"Y"," Y"),"Z"," Z"))

 

It is also possible to solve this problem ‘cleverly’ by creating loops using Matchall & a timer control, but this method is logically more complicated and I don't think it is necessary.

 

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @BarryCoombs ,

 

Please try:

 

Trim(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute("BillSmith","A"," A"),"B"," B"),"C"," C"),"D"," D"),"E"," E"),"F"," F"),"G"," G"),"H"," H"),"I"," I"),"J"," J"),"K"," K"),"L"," L"),"M"," M"),"N"," N"),"O"," O"),"P"," P"),"Q"," Q"),"R"," R"),"S"," S"),"T"," T"),"U"," U"),"V"," V"),"W"," W"),"X"," X"),"Y"," Y"),"Z"," Z"))

 

It is also possible to solve this problem ‘cleverly’ by creating loops using Matchall & a timer control, but this method is logically more complicated and I don't think it is necessary.

 

Best Regards,

Bof

BarryCoombs
New Member

That worked, many thanks

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (2,633)