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 / Expected text error
Power Apps
Answered

Expected text error

(0) ShareShare
ReportReport
Posted on by 95

Hopefully a simple question here:

 

Can someone explain why neither of these work and what is the alternative?  I am trying to split first and last name.

thankyou

 

Split(BrowseGallery1.Selected.FinancialDelegate.DisplayName, " ")..... this didn't work so I thought I'd try this:

Split(Text(BrowseGallery1.Selected.FinancialDelegate.DisplayName), " ")

 

thanks

Categories:
I have the same question (0)
  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Whats happening here is that you are not getting the display name from gallery as it is a lookup... check and see if you are able to get the name in a variable or in another text label.

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @everdingk,

     

    I just did a quick test on my end and your first code should work:

    Split(BrowseGallery1.Selected.FinancialDelegate.DisplayName, " ")

    Do note that the Split function will return a table with a column called Value.

     

    You can display the result via that function in e.g. a Gallery control, or use the Index function to fetch either the First / Last name and display it in a label outside of the gallery:

    //Label outside the gallery
    //Use either 1 or 2 as the second Index parameter
    Index(Split(BrowseGallery1.Selected.FinancialDelegate.DisplayName, " "), 1).Value

     

    Should you want to display the First and Last name separately within the gallery, use ThisItem instead of Gallery.Selected:

    //Label inside the gallery
    //Use either 1 or 2 as the second Index parameter
    Index(Split(ThisItem.FinancialDelegate.DisplayName, " "), 1).Value

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard