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 / Clear everything after...
Power Apps
Answered

Clear everything after a parenthesis in my string

(0) ShareShare
ReportReport
Posted on by 194

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!

Categories:
I have the same question (0)
  • calerof Profile Picture
    255 on at

    Hi @Nicci,

    You can use this code in a Text Label control:

     

    Trim( Left(Gallery1.Selected.Id, Find(" ", Gallery1.Selected.Id) ) )

     

    page1.png

    Cheers,

    Fernando

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    @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

  • Verified answer
    SpongYe Profile Picture
    5,715 Super User 2025 Season 2 on at

    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.

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    @SpongYe sweet i missed his question completely. 

  • Nicci Profile Picture
    194 on at

    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.

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
Kalathiya Profile Picture

Kalathiya 408

#2
WarrenBelz Profile Picture

WarrenBelz 382 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 328 Super User 2025 Season 2

Last 30 days Overall leaderboard