cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to get Office365Users.SearchUser({searchTerm: <text_box>}).Mail to display ONLY text N

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 & ", ")

View solution in original post

5 REPLIES 5
Super User
Super User

Re: How to get Office365Users.SearchUser({searchTerm: <text_box>}).Mail to display ONLY text N

Have you tried a List Box?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Super User
Super User

Re: How to get Office365Users.SearchUser({searchTerm: <text_box>}).Mail to display ONLY text N

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 & ", ")

View solution in original post

Super User
Super User

Re: How to get Office365Users.SearchUser({searchTerm: <text_box>}).Mail to display ONLY text N

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

Super User
Super User

Re: How to get Office365Users.SearchUser({searchTerm: <text_box>}).Mail to display ONLY text N

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.

Super User
Super User

Re: How to get Office365Users.SearchUser({searchTerm: <text_box>}).Mail to display ONLY text N

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)

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,453)