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

Default Selected Values - Listbox

Hi,

 

  I'm working on an application for People and Food Items and am trying to work on the updating portion of the app.  The issue I'm having is setting the default food items from a listbox as being what a person has selected. So for example:

If Sally chose Pizza and Ice Cream than when opening Sally's record from the gallery, I want the Default setting for the Food Listbox on the Edit Form to have Pizza and Ice Cream already selected.  I've tried using LookUp but didn't have any luck with that.  Anyone out there have any idea how to make the Default for a listbox on an EditForm be the items selected by a specific Person?

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Community Champion
Community Champion

4 REPLIES 4
v-yamao-msft
Community Support
Community Support

Hi dhofknecht,

 

What’s the data source? What’s the column type of food items?


To test this issue, I use SharePoint list as the data source, and there are two Text columns in my list.


I can use Lookup function to show what I have entered in the row on a ListBox control.


I add a Listbox control on the EditForm, then set its Items property as:
[LookUp(ProjectEmail,ID=BrowseGallery1.Selected.ID,Single),LookUp(ProjectEmail,ID=BrowseGallery1.Selected.ID,bimp)]


When I navigate from the BrowseGallery screen to the EditForm screen, the value will be displayed on the listbox.


Please take it for a reference.

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Meneghino
Community Champion
Community Champion

It is not possible to set multiple items as the defult property.

Please vote for this:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Listbox-Pre-Selection-of-Listbox-from-Existing-r...

The data source is SQL.  I am able to make the Items show up as I want them to I was trying to see if I could set the Default to be the Food Items for that Person.

As @Meneghino mentioned, the listbox currently doesn't support multiple default selections. I've posted a couple of workarounds for this issue:

- If you want to display the items outside of a form, you can use a gallery that "looks like" a listbox.

- If you need to display the items inside a form (since galleries cannot be used inside forms), you can use other controls (such as checkboxes) to let the user select from the list of possible cho....

 

We should have a better support for multi-select coming soon, but for now you can use one of the existing workarounds.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,212)