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

PowerApps CDS Users and Office365Users question

Hello,

 

In my PowerApp, i have a gallery that displays info from a custom CDS entity, one of the fields being a User lookup (named Physician).  When I select the item, it brings up all of that item's fields so the user can edit the information.... this is where I have my problem.  Instead of using the User table for my Physician field combobox, I use the Office365Users table as my Users table does not have every single user yet. After I select the item in my gallery, I cannot figure out how to set the Office365Users combobox default to gal.selected.physician.'Full Name'.

 

I have tried various expressions such as filter(Office365Users.SearchUsersV2(),Email=Gal.Selected.Physician.'Preferred Email')) as well as a few others and I am at a loss.

 

Any assistance I can get will be greatly appreciated... I have been messing with this for hours and I am DONE..  Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Hi @LongRiders971 ,

 

You will need to apply the formula in "DefaultSelectedItems" property of the Combo box.

 

Below is the intro for Combo box:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-combo-box#key-properti...

DefaultSelectedItems – The initial selected item(s) before the user interacts with the control.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

3 REPLIES 3
Highlighted
Microsoft
Microsoft

Hi @LongRiders971 ,

 

Have you tried below formula yet?

Filter(Office365Users.SearchUserV2().value,Email=Gal.Selected.Physician.'Preferred Email')

 

Office365Users.SearchUserV2().value this is the table of all users.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Highlighted

Hello @v-jefferni ,

 

I have tried this formula and it will not auto-populate the field with my .Selected.  I even tried removing the gal.selected.Approver... and I  added Email="email@company.com" and it still wouldn't work and i get the red x saying there is an error.  Obviously, i replaced email@company.com with a real email address.

 

LongRiders971_0-1606242142253.png

LongRiders971_1-1606242209252.png

This is driving me crazy because I know it is going to be something stupid.

 

Highlighted

Hi @LongRiders971 ,

 

You will need to apply the formula in "DefaultSelectedItems" property of the Combo box.

 

Below is the intro for Combo box:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/controls/control-combo-box#key-properti...

DefaultSelectedItems – The initial selected item(s) before the user interacts with the control.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,056)