cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Re: Changing value in a collection when selected in a ListBox

Hi @ Eelman

Many thanks for your reply. I did what you suggested, 

1. Items (InnerGallery):

Filter(IdeasTest,Question=ThisItem.Question)

 

2. OnSelect (InnerGallery):

Patch(IdeasTest,LookUp(IdeasTest,Participant=ThisItem.Participant),{VarSelect: !VarSelect})


3. TemplateFill (InnerGallery):

If(ThisItem.VarSelect,Blue,RGBA(0, 0, 0, 0))

 

4. Items (OuterGallery):

GroupBy(IdeasTest,"Question","currentQuestion")

 

5. OnVisible:

ClearCollect(
   IdeasTest,
   { Question: 1, Participant: "Change the world", VarSelect: true}, 
   { Question: 1, Participant: "A robot", VarSelect: false}, 
   { Question: 1, Participant: "An online course", VarSelect: false},
   { Question: 2, Participant: "AI algorithm", VarSelect: false}, 
   { Question: 2, Participant: "More holidays", VarSelect: false}, 
   { Question: 2, Participant: "Have more functions on PowerApps", VarSelect: false},
   { Question: 3, Participant: "More money", VarSelect:false}, 
   { Question: 3, Participant: "More sleep", VarSelect: false}, 
   { Question: 3, Participant: "More vacations", VarSelect: false}
)

 

And I still get the same results as shown on the image:

Gallery_Multi_selection_2.png

 

I really don't know where is the mistake, Am I missing something this time?

Best

Jonathan

Highlighted
Super User II
Super User II

Re: Changing value in a collection when selected in a ListBox

@Anonymous 

I think you're using a horizontal InnerGallery, is that correct? I just tried putting a horizontal gallery as the InnerGallery and was getting odd behaviour.

 

Delete the Inner gallery and insert a vertical gallery instead. This should work. If not, try adding the OnVisible ClearCollect to a button and run it from there to see if that works.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Changing value in a collection when selected in a ListBox

Hi @ Eelman 

Many thanks for the reply. That was the error, it does not work with horizontal gallery. It is a bit strange though. Anyway, that is the solution and now it works, many thanks.

Best!

Jonathan

Highlighted
Super User II
Super User II

Re: Changing value in a collection when selected in a ListBox

@Anonymous 

Glad we got it sorted, we got there in the end 🙂

 

All the best mate.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,155)