Showing results for 
Search instead for 
Did you mean: 
Level 8

Update Main Gallery with Secondary Gallery selected item


         I have created an app that has multiple galleries on the screen. The Primary Gallery is a search box .Selecting an item from the search results will update the various other galleries from the selected items record. 


What i am having trouble with is this. On one of the secondary galleries it shows releated items to the selected item. What i am wanting to be be able to do is click on an item from the secondary gallery which would then update the Primary gallery with that item, which in turn updates all the other galleries. 


I was trying to set the OnSelect option of the secondary gallery to something like 

gallery1.AllItems.FullName = ThisItem.FullName

But that does change the selected item in the Primary gallery to anything. 

I also tried 

gallery1.selected = ThisItem.FullName

But that didnt work.


I know at one point i had this working but cannot for the life of me figure out what the code is. Does anyone have any suggestions. 

Please let me know if i need to explain the issue better.



Community Support Team
Community Support Team

Re: Update Main Gallery with Secondary Gallery selected item

Hi @stephenJames ,


You can use Patch to update the item from Primary Gallery(Gallery1):

Patch(List1, Gallery1.Selected, {Title:....,Name:ThisItem.FullName})



Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 8

Re: Update Main Gallery with Secondary Gallery selected item

Hi @v-monli-msft 

                             Thanks for your suggesstion. However i do not believe this will work. From the Patch fuction documentation it shows "Use the Patch function to modify one or more records of a data source.". I am not modifying any records.

I apologize, as i dont think i have explained my question correctly.


My Primary Gallery is a search box that allows me to search users. I have two additional galleries (Details Gallery and User Gallery) that display data based on the selected user in the Primary Gallery.


I can get the User Gallery and Details Gallery to display data based on the searched for user. 


What i would liek to do is be able to view a new selected user if they have been clicked on via either the User Gallery or Details Gallery.


So if i search for John in the seach box and select the correct user named John  it will display data about John in the User Gallery and Details Gallery.

Under the User gallery it may show that John has David who works for him. I would like to be able to now click on David (without having to go back to the Search box and search for David) and have the User Gallery and Details Gallery now show Davids information.


I hope this is a better explaination.

Helpful resources


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,990)