web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / I want to get informat...
Power Apps
Answered

I want to get information out the middle of a textbox

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So basically I have a column with information of the person. I have it layed out like this:

Name || phone number || email

How can I only get the phone number? 

Thanks in advance!

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Maybe you can use mid and find.

     

    Mid(text, Find("||",text),length of phone number)

     

    You may have to add 2-3 to your Find result.

    2020-04-07_1046.png

  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    Hi @Anonymous 

    @Anonymous's suggestion will work. However, if you apply this against a data value with a phone number that is of variable length, you'll need to add some additional formula to determine the length of the string that you want to extract with the mid function.

    An alternative method is to split the input value into a table using the "||" characters as a row separator, to retrieve the second row. Here's the formula to do this.

    Last(
     FirstN(Split("Name || phone number || email", "||"),
     2
     )
    ).Result

     

    image.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you both for your replies. How can I remove all the spaces that are between the numbers? @timl @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Substitute(Text," ","")

  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    @Anonymous is correct in that the substitute function will strip out the spaces. You can chain these functions like so...

     

    Substitute(
     Last(
     FirstN(Split("Name || phone number || email", "||"),
     2
     )
     ).Result,
     " ",
     ""
    )

     

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

    Hi @Anonymous ,

    Based on the needs that you mentioned, I think the Substitute function and Split function could achieve your needs.

     

    I have made a test on my side, please take a try with the following workaround:

    11.JPG

    Set the Text property of the Label to following:

    Last(FirstN(Split(Substitute(TextInput2.Text, " ", ""), "||"), 2)).Result

    On your side, you should type the following formula:

    Last(
     FirstN(
     Split(
     Substitute(PersonInfoTextInputBox.Text, " ", ""), 
     "||"
     ), 
     2
     )
    ).Result

     

    Please take a try with above solution, then check if the issue is solved.

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard