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 / Defaultselecteditem co...
Power Apps
Unanswered

Defaultselecteditem combobox for Person column in Sharepoint and then send a mail to them

(0) ShareShare
ReportReport
Posted on by 25

Hello,

 

I'm creating an app and there is a error I can't manage to solve.

What I want to do :

I have a sharepoint list with a person/group column where there is office mails in it. I would like to have a combobox control that takes for DefaultSelectedItems the people from the the person/group column of the first line of the sharepoint list. Then I would like to send a mail to these selected people.

 

I put this code for the combobox DefaultSelectedItems:

LookUp('splist';name= Dropdown2.SelectedText.Value;peopleColumn)

For items : 

EmericTms_1-1704376476794.png

For Displayfields : ["DisplayName";"Mail"] and for searshfields : ["DisplayName"].

 

The people appear well on the combobox selection !

 

The error :

When I try to send the mail, I have this error : 

EmericTms_0-1704376246843.png

From what I understand, the combobox is empty and there is no email selected. When I select a new mail adress, then it works fine... 

Do you know how I can manage to solve this error ?

 

The code to send the mail : 

Office365Outlook.SendEmailV2(
Concat(ComboBox1_4.SelectedItems; Mail&";");

TextInput2_2.Text;
"Bonjour,"

 

Thank you for your help ! 

 

Best regards,

Emeric 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,344 Most Valuable Professional on at

    Hi @EmericTms ,

    You issue is that there is a difference in the structure of your Person Field and the Combo Box Items - where Email (in the field) is called Mail. So your DefaultSelectedItems

    With(
     {
     _Data:
     LookUp(
     'splist';
     name = Dropdown2.SelectedText.Value
     ).peopleColumn
     };
     {
     DisplayName: _Data.DisplayName;
     Mail: _Data.Email
     }
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

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 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard