cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Henry1
Level: Powered On

Listbox set value of SelectedItem

Is it posible to set them selected items of a list box using another object doing something like the following

button1: OnSelect = ListBox1.SelectedItems.Value = "1"

 

2017-10-30_23-02-53.jpg

3 REPLIES 3
Power Apps Staff rc
Power Apps Staff

Re: Listbox set value of SelectedItem

The way to do this in PowerApps is to have the button OnSelect set a variable. Then have the Default property of the listbox = that variable.

 

Button.OnSelect = Set( YourNewVariable, YourNewValue )

Listbox.Default = YourNewVariable

 

A brief gif of this in action attached. You can learn more about variables here: https://powerapps.microsoft.com/en-us/tutorials/working-with-variables/

 

Good luck!

Community Support Team
Community Support Team

Re: Listbox set value of SelectedItem

Hi @Henry1,

 

ListBox1.Selectitems is an output property of ListBox control, the value of this property will not be updated through another Object, once it is changed by the user, it will just hold the user selection (user Input).

ListBox could be reset to its default value, which is configured through the Default property of the ListBox control.

For more information about the ListBox control and its property, please check:

ListBox control in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MK1
Level: Powered On

Re: Listbox set value of SelectedItem

LISTBOX DEFAULT SELECT ALL

 

ComboBox with multi select

ItemsDistinct(Filter(Product,Name.Id=Dropdown.Selected.ID),Title)

ListBox

Items: Distinct(Filter(product,Title in Listbox.SelectedItems),Description)

Default:LookUp(Product,Title in listbox.SelectedItems.Result,Description)

textInput: Concat(ADDescription.SelectedItems,Result&",")

 

while using this scenario, Its working when there is only one item in the combobox and if we select it the description is selected default and added to the textbox

But, when we select multiple items in the combobox, on description it shows both descriptions are selected but its only populating one description on top of the list.

Can you help me with were i'm messing with the formula.

Thanks in advance.

MK

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,759)