cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ShobhitDeep
Regular Visitor

ComboBox DefaltSelectedItems shows Duplicate Items Selected

Setting DefaultSelectedItems in a Combo Box shows multiple items selected if the label (values) are identical irrespective of these having different Ids.
Example: In my list options I have three items as follows:

ID   Value

  1.     EUCAN
  2.     EEMEA
  3.     EUCAN (this item has duplicate label as #1)

I initiate a variable to hold back the selection values of this Combo Box as varSelectedRegions. Based on other drop down values, I have the varSelectedRegions as {{EUCAN, 1}, {EEMEA, 2}} i.e. two items saved in the variable as selection. 

I use the following formula in DefaultSelectedItems to show selected items in the Combo Box:

ForAll(varSelectedRegions, {Value: Value, Id: Id })

The items are displayed as selected in the Combo Box but not only #1 and #2 - #3 as well as it has same label as one of the selections I've set. Though when I save this item in the list, column values are selected correctly as #1 and #2.

Is there something I'm doing wrong here or this is a defect in displaying the selected items in the Combo Box which does not take Id in account?

4 REPLIES 4
RandyHayes
Super User III
Super User III

@ShobhitDeep 

Actually what you are seeing is related more to the search part - and I would actually consider it a bit of a design flaw/bug.

 

The reality is, your selected items are correct and only address the ID 1 and ID 2.  ID 3 is not really selected, it just appears that way - I believe because of the way that the control displays and highlights.  

 

The only real way around it would be to have unique items in the combobox.  Which is really what you want.  Because, from a user standpoint, if you see a list of items that have the same names...which one would you pick?  How would I know that the first one is ID 1 and the last one is ID 3?

 

I hope this is helpful for you.

 

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

@RandyHayes : Correct; completely agree with your logic. In actual scenario having two items with same title will not be a reasonable implementation. In fact this defect is also discovered due to a defect in my implementation. I already fixed my defect and dont have any duplicate title items anymore...

 

@ShobhitDeep 

Yes, the more that I thought about it after I replied...the more I realized it would definitely not be something you would want.

Like a list of colors and two "Red"s listed....then telling the user they picked the wrong "Red".  Not so good.

Anyway, glad you got it sorted out.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

@RandyHayes :

 

Correct! Though a technical defect, we can call it a usability feature! LOL!

😁 😂 😋

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

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

Top Solution Authors
Top Kudoed Authors
Users online (75,176)