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 search for the ...
Power Apps
Unanswered

how to search for the user's login email by selecting the value in the dropdown

(0) ShareShare
ReportReport
Posted on by

I have a dropdown that is populated by a column in a sharepoint list, and it contains some names, however I want that when the user selects the name, save in another field the email of the user selected in the dropdown.

 

I already have an Offic365Users connection, and I couldn't find a solution

 

And using User () in PowerApps, it doesn't work, it would have to be the connection of Office365 Users

 

So, how I do it? 

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    What type of column contains the name in SharePoint?

     

     

  • Gorilla_8 Profile Picture
    on at

    @JR-BejeweledOne 

    Its a choice column 

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Unfortunately the User() function only returns information about the logged in user and you can't use the Office365 connector the way you are trying to.

     

    What you can do is something like this:

     

    Change the control where you want the email address to display to a combobox and set it's formula like this:

     

    Filter(Office365Users.SearchUser({searchTerm: Dropdown.SelectedText.Value}), AccountEnabled=true).Mail

     

    Your user will have to select the email address from the Combobox.   I haven't found a way to set the Default value of the combobox using this formula.

  • Gorilla_8 Profile Picture
    on at

    @JR-BejeweledOne 

     

    I see this formula on the community too, but didn't work...

    I got this error: incomparable type. The 'searchterm' column in the data source you are using expects a 'text' type, and you are using an 'error' type


    It is not possible through the selection of the username in the choice column appears his email in another field?

  • Gorilla_8 Profile Picture
    on at

    I'm thinking here and put a way that when he selects the user in the column, select the email from another column but the same ID.

     

    Example:

    He selects in the column "UsuarioNome" = Gorilla_8

     

    And so in another field appears the email =

    "gorilla_8@email.com"

     

    And if for another user and goes like this ...

     

    It would be possible?

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

     So far this is the only way I have been able to come close to what you want.

     

    This is the Items formula in the combox box.

     

    filterformula.png

     

     

    comboboxandtextinput.png

     

     

     

     

    combobox.png

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Depending on how those names are formatted in the SharePoint list, they may not be able to be used for searching the Office 365 users.   It would have to be in email format or a last name, which you can see in my example.

  • Gorilla_8 Profile Picture
    on at

    @JR-BejeweledOne 

    The items on the dropdown column where the user select the name:

    Choices([@DataSource].MyFieldName)

    And here the Default property of the text field:

    Filter(UsuáriosdoOffice365.SearchUser({searchTerm: DataCardValue1_3.Selected.Value}); AccountEnabled=true).Mail

    This one I got error


  • Gorilla_8 Profile Picture
    on at

    @JR-BejeweledOne 

     

    When you say:

    Depending on how those names are formatted in the SharePoint list, they may not be able to be used for searching the Office 365 users.   It would have to be in email format or a last name, which you can see in my example.

    My idea was to get the data from the second column by selecting the name and in the other field appears the email

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I know.   Unfortunately the Office 365 user connector only works with certain inputs.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard