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

Save and Continue/Load Multi-Choice Options

Hi,

 

I have a multi-value list box where the end-user can select one/many items. When my form is saved, I can load, or view the saved data on all other fields except for the multi-value ones.

 

For example if I select Option A and Option B in a list of 5 choices, on save (via SubmitForm) these are saved to the SharePoint list but on the screen, they are cleared down/reset.

 

I have tried to get around this by using the below (in the Items property of my ListBox), however all this does is return what was selected rather than all items and selecting the ones that are saved. It feels like there's a 'SelectedItems' property or similar that I'm missing here?

 

If(IsBlank(record), Choices(data.RiskFactors), record.RiskFactors)

What I want to happen on save is that I see all of the items but the ones I selected pre-save to still be highlighted... Am I missing something obvious here?

 

I'll keep plugging away, but any help would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @BMarsh4 , 

 

Currently there is no way to select multiple items in a listbox. An idea has been submitted on the forum already to add this functionality. Please upvote it.
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Listbox-Pre-Selection-of-Listbox-from-Existing-r...
But as a workaround, please try to use ComboxBox, they allow multiple selection as well. For doing so, you need to update the Default and Items property of the Combobox and Update property of the data card.
Combobox: DefaultSelectedItems: Parent.Default
          Items:  Choices(data.RiskFactors)
          
DataCard: Update: ComboBox1.SelectedItemsMicrosoftTeams-image (42).png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @BMarsh4 , 

 

Currently there is no way to select multiple items in a listbox. An idea has been submitted on the forum already to add this functionality. Please upvote it.
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Listbox-Pre-Selection-of-Listbox-from-Existing-r...
But as a workaround, please try to use ComboxBox, they allow multiple selection as well. For doing so, you need to update the Default and Items property of the Combobox and Update property of the data card.
Combobox: DefaultSelectedItems: Parent.Default
          Items:  Choices(data.RiskFactors)
          
DataCard: Update: ComboBox1.SelectedItemsMicrosoftTeams-image (42).png

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Thanks @yashag2255!

I had noticed that I had a combobox working as I'd hoped shortly after posting so have been experimenting with that and does the trick, just as you've said below.

 

Thanks for taking the time to look.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,070)