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

Combo Box with Distinct Items cannot set DefaultSelectedItems

I am trying to set the DefaultSelectedItems on a Combo Box where the Items are set as Distinct('[dbo].[MyItems]','Column1').

 

I've tried different statements in DefaultSelectedItems but haven't been able to get it working.

 

Without using the distinct function everything works fine; however, I need to use distinct to remove the duplicate values.

 

Has anyone been able to get this working or know if it's possible?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Combo Box with Distinct Items cannot set DefaultSelectedItems

Hi @Andy6 

 

Distinct function creates a column of its own(Result) and doesn't use the same value as Data Source. Can you please verify if you are using the correct attribute in DefaultSelectedItems? Please share a screenshot/snippet so that we can help you better.
 
Thanks, 
Andy6
Level: Powered On

Re: Combo Box with Distinct Items cannot set DefaultSelectedItems

Thank you for your comment yashag.

 

I was setting the DefaultSelectedItems to 

Filter('[dbo].[MyItems]','Column1'="Item4")

 

After changing this to include Distinct, it started working

Distinct(Filter('[dbo].[MyItems]','Column1'="Item4"), 'Column1')

2 REPLIES 2
Super User
Super User

Re: Combo Box with Distinct Items cannot set DefaultSelectedItems

Hi @Andy6 

 

Distinct function creates a column of its own(Result) and doesn't use the same value as Data Source. Can you please verify if you are using the correct attribute in DefaultSelectedItems? Please share a screenshot/snippet so that we can help you better.
 
Thanks, 
Andy6
Level: Powered On

Re: Combo Box with Distinct Items cannot set DefaultSelectedItems

Thank you for your comment yashag.

 

I was setting the DefaultSelectedItems to 

Filter('[dbo].[MyItems]','Column1'="Item4")

 

After changing this to include Distinct, it started working

Distinct(Filter('[dbo].[MyItems]','Column1'="Item4"), 'Column1')

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: 113 members 4,927 guests
Please welcome our newest community members: