cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stephenJames
Level 8

Update Main Gallery with Secondary Gallery selected item

Hello, 

         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.

 

 

2 REPLIES 2
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})

Regards,

Mona

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.
stephenJames
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

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 4 members 6,542 guests
Please welcome our newest community members: