RCarmody
RCarmody

Reputation: 720

PowerApps ComboBox with Multiple Default Values

I have a combobox that is showing data from a SPT List.

I'd like it to show the current values listed in the SPT list (the column is a lookup list) when you first navigate to it, and then you can adjust it from there (using the patch function).

My issue is that the only way I can get this to work is if I set my formula to the first function, which means only the first, current value will appear:

First(Gallery1.Selected.wp.Value)

How would I work around this to show all of the values already selected?

Upvotes: 0

Views: 7459

Answers (1)

SeaDude
SeaDude

Reputation: 4365

Comboboxes have 3 properties you should consider:

  • Items
  • SelectMultiple
  • DefaultSelectedValues

You typically don't want to point a control right to a DataSource, but rather create a Collection of the data and point the control to the Collection (or in this case, a column in the Collection).

If the Items property is set to a Collection, SelectMultiple is set to true and DefaultSelectedValues is set to Collection.Column, you're good to go.

See here: enter image description here

Upvotes: 3

Related Questions