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 Email addre...
Power Apps
Answered

How to get Email address from a Person type column from Collection

(0) ShareShare
ReportReport
Posted on by 106

I have a SharePoint List named "SupportPersons" and it has only two column with below type

Column Name              Type

-----------------           -----------

SupportPerson            Person

MobileNumber            Text

 

In PowerApps I have created a Collection named "SupportPersonList" which is taking values/data from that SharePoint list.

 

Collect(SupportPersonList,ITSupportPersons);

 

Now how I can get Email Address from the Person type column from this Collection i.e  "SupportPersonList" in Power Apps?

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @hkmamun 

    To get the email of the First person in the collection

    First(SupportPersonList).SupportPersons.mail

     

    Or to get a column containing all the emails for every person

    SupportPersonList.SupportPerson.mail

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • hkmamun Profile Picture
    106 on at

    @mdevaney  I have used you way but it is giving error "Name isn't valid. This identifier isn't recognized." Below is my code

    If(MyProfile.Mail in SupportPersonList.SupportPerson.mail,Set(isSupportPerson,true),Set(isSupportPerson,false));

     

    Thanks!

  • mdevaney Profile Picture
    29,993 Moderator on at

    @hkmamun 

    It would be helpful to share a screenshot.  I don't know where that error is occurring in your code without it.

     

    If its occurring here...

    SupportPersonList.SupportPerson.mail

     

    Type the text in manually.  After you type each dot '.' see what fields are avialable.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • hkmamun Profile Picture
    106 on at

    @mdevaney  the mail property part of below code giving the error

     

    SupportPersonList.SupportPerson.mail

     

    Error.png

  • mdevaney Profile Picture
    29,993 Moderator on at

    @hkmamun 

    Type SupportPersonList.SupportPerson. in the formula bar and then browse through all the available options that appear.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • hkmamun Profile Picture
    106 on at

    @mdevaney  nothing is coming after . (dot)

     

    Error.png

     

     

    Thanks!

  • mdevaney Profile Picture
    29,993 Moderator on at

    @hkmamun 

    If there are no autocomplete options either it’s not a person column or your haven’t populated it with any data.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

    Hi @hkmamun :

    Could you tell me:

    • Does the 'SupportPerson' field allow multiple sellections?
    • Whether to assign a value to the isSupportPerson variable based on whether MyProfile.Mail exists in SupportPerson?

    Firstly,let me explain why you encounted this error.

    The value of SupportPersonList.SupportPerson is a list of sub tables.Directly referencing a field in a list of sub-talbes will result in a syntax error.

    The correct way is to traverse the records in the data source.

    Secondly,please try these soutions:

    Case 1:Multiple choices are not allowed.

    Please try :

     

    If(MyProfile.Mail in ForAll(SupportPersonList.SupportPerson,SupportPerson.Email),Set(isSupportPerson,true),Set(isSupportPerson,false));

     

     Case 2:Allow multiple choices.

     

    If(MyProfile.Mail in Ungroup(ForAll(SupportPersonList.SupportPerson,SupportPerson.Email),"Value"),Set(isSupportPerson,true),Set(isSupportPerson,false));

     

    Best Regards,

    Bof

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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard