cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Henry1
Advocate I
Advocate I

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
rc
Power Apps
Power Apps

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!

v-micsh-msft
Community Support
Community Support

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
Helper IV
Helper IV

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (85,718)