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!

 

View solution in original post

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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (45,941)