cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
coder57
Frequent Visitor

Setting a combobox default from a split string of 365 emails

Hi

 

I am testing sending emails within PowerApps. My main source is here (Shane Young send email) 
I have created a combo box linked to the Office365User connector to search to capture the people I wish to email in my organisation.

The combo items is set by the following, where DataCardValue153 is the combo box

 

Office365Users.SearchUserV2({searchTerm:DataCardValue153.SearchText}).value

 

The update statement in New form  mode for the data card is

 

Concat(  DataCardValue153.SelectedItems, Mail,";")

 

This works and the data sored in the SQL table is fred.flintston@somedomain.com;barney.rubble@somedomain.com etc

 

The question I have is how to set the default of the combo box from the data retrieved from the SQL datatable when the form is in Edit Mode?
So when in edit mode the combo box would show the users, so far I have tried

 

Default = Filter(Table(Office365Users.SearchUserV2()) ,Mail in (Split(ThisItem.EmailRoute,";"))

 

however, my datatypes are incorrect

 

Any advise or pointers welcome

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User III
Super User III

@coder57 

If you set the DefaultSelectedItems property (rather than the Default property) to the following formula, it should hopefully display the email addresses correctly.

RenameColumns(Split(ThisItem.EmailRoute, ";"),"Result", "Mail")

 

View solution in original post

1 REPLY 1
timl
Super User III
Super User III

@coder57 

If you set the DefaultSelectedItems property (rather than the Default property) to the following formula, it should hopefully display the email addresses correctly.

RenameColumns(Split(ThisItem.EmailRoute, ";"),"Result", "Mail")

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (12,844)