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 / How to get Office365Us...
Power Apps
Answered

How to get Office365Users.SearchUser({searchTerm: }).Mail to display ONLY text NOT table?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello, 

 

I'd like to use a textbox to search for an O365User then show ONLY the Email Addresss of that person in another textbox. I get the error "The property expects text values but this rule produces incompatible table values". I don't want to use a Gallery in this case. What are the options? 

 

Thanks

Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Have you tried a List Box?

  • Verified answer
    timl Profile Picture
    36,958 Super User 2026 Season 1 on at

    Hi @ericonline

     

    The SearchUser function can return multiple results depending on the search term that you provide. That's the reason behind the 'incompatible table values' error.

    There are a few ways to display the result in a textbox. To display the first result, you can use the following formula:

    First(Office365Users.SearchUser({searchTerm:<text_box>})).Mail


    If you want to display a coma separated list of email addresses, you can use the Concat function like so:

    Concat(Office365Users.SearchUser({searchTerm:<text_box>}), Mail & ", ")
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you Jeff and timl for your responses. 

     

    I ended up using timl's...

    First(Office365Users.SearchUser({searchTerm:<text_box>.Selected.DisplayName})).MailNickname

     ... but changed it a bit because the search <text_box> is actually a Sharepoint Person column. 

     

    The weird thing about this though is that when there is no search term in the search <text_box>, the results textbox shows "0151E132". What is this value? 


    Thanks

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

    Hi @ericonline

     

    When you enter no search term into the textbox, I suspect that the SearchUser function will return all users in your organisation. I imagine that '0151E132' relates to the first item in this list, and this might relate to some sort of service account.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Interesting. I was able to suppress it using: 

     

     

    If(
    IsBlank(
    <text_box>.Selected),"_", (<--This is the default value of the <text_box> search)
    First(Office365Users.SearchUser({searchTerm:<text_box>.Selected.DisplayName})).Mail)

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard