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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,286)