cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Eelman
Level 10

ComboBox DefaultSelectedItems functionality

Hi everyone,

I'm struggling with the functionality of a ComboBox's DefaultSelectedItems property.

 

What I'm trying to do is take a Single Line Text field in SP, which holds names separated by ";", and use this as the Default items in a combobox. I can do this part but when I try to view or Update these items back to a collection (I'll then patch these back to the SP text field ... if I get this working?) the CB is showing there are items there but there's no data. This is probably better explained using an image:

 

ComboBox_DefaultItems.jpg

Notes:

- colFortnight is a filtered collection built from the SP List

- FNStaffNames is the text column in SP holding the names separated by ";"

- ComboBox.Items = 'User Details'.'Full Name'

 

To get the default CB items I'm using the above ForAll() statement, and this appears to work fine as it's showing 4 items. If I click the dropdown I can see the names, which seems all good.

 

But when I throw the CB.SelectedItems into a gallery (as an example) the gallery appears to know there are 4 items but there's no data. The label in the gallery is set to ThisItem.'Full Name'. Further to this, if I add an extra name using the CB it DOES appear in the gallery.

My intent is for users to have access to the current list of names in the SP column and be able to Add/Delete from that list. Is there a way to access these default items to do this sort of manipulation? Is there a better process to use here?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-siky-msft
Microsoft

Re: ComboBox DefaultSelectedItems functionality

@Eelman 

The default values need to come from a combo box data source. Although your combo box appears to select items, they are not actually selected.

could you try this?

Filter('User Details'.'Full Name', 'Full Name' in Split(First(colFortnight).FNStaffNames,";"))

If this doesn't work, please share more information with the combo box and corresponding field.

Sik 

View solution in original post

2 REPLIES 2
Microsoft v-siky-msft
Microsoft

Re: ComboBox DefaultSelectedItems functionality

@Eelman 

The default values need to come from a combo box data source. Although your combo box appears to select items, they are not actually selected.

could you try this?

Filter('User Details'.'Full Name', 'Full Name' in Split(First(colFortnight).FNStaffNames,";"))

If this doesn't work, please share more information with the combo box and corresponding field.

Sik 

View solution in original post

Eelman
Level 10

Re: ComboBox DefaultSelectedItems functionality

@v-siky-msft 

Perfect, that worked!! I can also see what I was doing wrong now, thanks. If I could add more than 1 Kudo I would 🙂 

 

Cheers

 

 

Helpful resources

Announcements
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,543)