cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Display items selected in combo-box in a Gallery

Hello! I have a combo-box in a form that allows users to choose one or more options from a selection of items. Some of the items in the combo-box are: "January", "February", "March", "April", and so on. The items in the list are pulled from a Lookup column in a SharePoint list ('review materials'), under the "Title" column.

 

jharville1_3-1606945316378.png

 

 

I have successfully used code to add whatever item the user selects to a collection, and pull in the corresponding email address to the same collection table but in the column to the right. The following is an example if the user selects "January" and "February"

jharville1_4-1606945348900.png

 

My application is an "Approvals" application, where all approvals are done in a Gallery (on the right side of the screen of the same screen as the details section of the submitted form). Each item selected in my combo-box is what is going to be approved. How would I display each item selected in my combo-box in separate sections of my Gallery?

 

For example: If the user selects: "January" , "February", "March" in my combo-box of the form, it should list out each selection separately in the Gallery. But currently, when I use this code: 'reviewComboBox.Selected.Value' (reviewComboBox is the name of my combo-box, and the Display Name in my form is "Review Material") in the 'Text' property, it shows this in my Gallery:

 

reviewmaterialexample.png

 

The first item chosen from the combo-box is shown 3 times, instead of each of the 3 items chosen from the combo-box shown once. I tried using the .SelectedItems code but it doesn't work as we need a text output, not a table.

 

 

Thank you!!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@jharville1 

You would need to set the Gallery Items to the following:

    reviewComboBox.SelectedItems

 

Then in your Gallery, you reference the items directly.  This will depend on the Items property of your Combobox.

But as an example, if your Combobox only have records with a Value column, then in your Gallery, your Text property would be ThisItem.Value

If the records defined in the Items of the ComboBox have your "Item" column, then your Text property in the Gallery would be ThisItem.Item

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
Super User III
Super User III

@jharville1 

You would need to set the Gallery Items to the following:

    reviewComboBox.SelectedItems

 

Then in your Gallery, you reference the items directly.  This will depend on the Items property of your Combobox.

But as an example, if your Combobox only have records with a Value column, then in your Gallery, your Text property would be ThisItem.Value

If the records defined in the Items of the ComboBox have your "Item" column, then your Text property in the Gallery would be ThisItem.Item

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Thank you as always, the solution was ThisItem.Title since that was what was used in the naming convention. The same thing as what you said but different name for the variable. I appreciate the help Randy!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (93,581)