Notifications
Announcements
Hi All,
This sounds simple, but I am just struggling with syntax! I have a string that looks like this: somethingsomething (12343)
I want to get rid of everything in the parenthesis including the parenthesis. How do I trim it? The numbers inside can vary in length so I cant just trim a set number of characters from the right. Thank you!
Hi @Nicci,
You can use this code in a Text Label control:
Trim( Left(Gallery1.Selected.Id, Find(" ", Gallery1.Selected.Id) ) )
Cheers,
Fernando
@Nicci "I want to get rid of everything in the parenthesis including the parenthesis" this is everything, or do you mean like this:
With({ctxLength:Len("(123231432414)")},Right( Left("(123231432414)",ctxLength-1), ctxLength - 2))
"(123231432414)" > 123231432414
Hi @Nicci
You code should look like:
First(Split("somethingsomething(12343)", "(")).Value
I also found a post that already tackled this issue https://powerusers.microsoft.com/t5/Building-Power-Apps/Deleting-part-of-a-string-from-a-label/td-p/240430
------------------------------------------------------------------------------------------------------------------------------If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.If you like my response, please give it a Thumbs Up.
@SpongYe sweet i missed his question completely.
This worked perfectly, thank you!!!! It was the First that I missed when I was trying to split 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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Kalathiya 408
WarrenBelz 382 Most Valuable Professional
MS.Ragavendar 328 Super User 2025 Season 2