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

Combo Box DefaultSelectedItems from Collection values from SharePoint List

Hello,

 

I am looking to have a Multiple Selection Combo Box be preselected with some of the values available. I have a SharePoint List with some entries that a user can choose from the PowerApp and it loads that entries values in to Labels. They can then choose to edit some of these fields. When the user chooses to edit the field, that Combo Box appears and I would like it to populate with the values that the entry has. When the user chooses to edit that field, I have a formula that looks at the value and parses it out since it is a string. Then it looks at each value and looks it up in another SharePoint list that the Combo Box also ties into for the options available. I add these values to a Collection and have been trying to get the formula correct in the DefaultSelectedItems property as well have been messing around with the Default property.

 

Some of the formula I have been trying in the DefaultSelectedItems propert without any luck. LocUsed is the name of the Collection. Loc is the name of the column in the LocUsed Collection.

ForAll(LocUsed, {Loc: 'Location Table'.'Location ID'})


LookUp('Location Table', 'Location Table'.'Location ID' = LocUsed.Loc)

 

I have tried some variations of the above. I get it to say it has no errors but it never populates the value. I think I am missing how the Combo Box wants to read in from the table of what items to be preselected.

 

Feel free to ask me for additional details if needed.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

@NHammond37 

So then, your ComboBox items has only ONE column - 'Concatenated Name'.

Your DefaultSelectedItems needs to match that:

ForAll(LocUsed, {'Concatenated Name': Loc})

This assumes that Loc is the matching column in your LocUsed (collection, variable, etc)

If it is not, then replace with the appropriate one.

_____________________________________________________________________________________
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!

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

@NHammond37 

What is the Items property of your ComboBox?  

To have items selected, the DefaultItemsSelected records MUST match the signature (columns) of the Items property exactly.

 

_____________________________________________________________________________________
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!
Highlighted

Filter('Location Table'.'Concatenated Name', Not("DO NOT USE" in 'Concatenated Name'))

 

This is the Items property on the Combo Box. I had to filter it a little bit to get rid of locations that shouldn't be used. Are signature columns like the ID column on a SharePoint List or can you set columns you create as signature columns as well?

Highlighted

@NHammond37 

So then, your ComboBox items has only ONE column - 'Concatenated Name'.

Your DefaultSelectedItems needs to match that:

ForAll(LocUsed, {'Concatenated Name': Loc})

This assumes that Loc is the matching column in your LocUsed (collection, variable, etc)

If it is not, then replace with the appropriate one.

_____________________________________________________________________________________
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!

View solution in original post

Highlighted

Thank you so much!!! It's working!! I've been trying to figure out what was wrong for awhile now.

Highlighted

@NHammond37 

Always a good learning process to hash it out on your own, but if it starts to frustrate, come on over to the forum and post 🙂

_____________________________________________________________________________________
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!

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 (8,456)