cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Sam44
Level: Powered On

Combobox DefaltselectedItems

I'm crafting Canvas app with CDS as datasource.

There is entity named "Employee" and this has "Full Name" and "Employee No" column.

Also one more entity named "Exam Results".

Exam results entity has several column such as "Exam Type", "Score", "Procter", "Employee (Search/lookup to Employee entity)"

 

On canvas app, I have combobox to select Employee because combobox allow me to search employees name and select them easily.

2019-08-20_19-34-26.jpg

Once I saved Exam result with Patch, all data was successfully saved to entity.

Then, on another screen, I put the gallery named "SearchGallery" to view exam results and re-edit these data again. When User select gallery Item, I need to put that record on Collection with reasons. The name of Collection is "SearchResults".

So I need to set "DefaltSelectedItems" value as below.
Items=Employee

DefaultSelectedItems=If(WorkType="New", [""],LookUp(SeachResults,ID='SearchGallery'.Selected.ID,FullName))

 

The result was no value.

I can settled DefaltSelectedItems if I directly refer gallery but I need to use Collection at this time and I found in collection, viewing table with GUI (View-Collection-inside table), there is link table "Employee" but seems inside is blank...... Why?

How can I set default value when I try to re-edit from Gallery?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Combobox DefaltselectedItems

Hi @Sam44 ,

 

I think this is because that you are using Employee as the data source of Items for combo box, but you are using the collection SeachResults as the data source of DefaultSelectedItems. Try to change the Items property to SeachResults and see if this could solve your issue.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Combobox DefaltselectedItems

Hi @Sam44 ,

 

I think this is because that you are using Employee as the data source of Items for combo box, but you are using the collection SeachResults as the data source of DefaultSelectedItems. Try to change the Items property to SeachResults and see if this could solve your issue.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sam44
Level: Powered On

Re: Combobox DefaltselectedItems

@v-monli-msft 

Thanks for your reply and yes, you were right!

Now I can solve this.

 

Appreciate your help!

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 57 members 4,912 guests
Please welcome our newest community members: