cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Multiple Galleries 1 edit form

Hi

 

I have this code Set(VarMode, "Edit"); Select(Parent); Navigate('Update Escalation Report') which on two galleries. The first gallery works fine but the other doesn't pull through the data. 

 

How can I have two galleries (same data) pulling into one edit form? 

 

The difference between the two galleries is the items shown. So I have an admin gallery that shows all records and the other is user-based only. 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User III
Dual Super User III

What is the Item property of the form set to?  That's what determines what is shown in the form.  I suspect that your item property is set to only reference one gallery like

Gallery1.Selected

What you need to do is add something to the navigation that uses an UpdateContext to set a variable to the record and then set the Item property of the form to point to the variable.  Like this

Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected), Navigate('Update Escalation Report') 

 Then set the item property to selectedRecord



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
Dual Super User III
Dual Super User III

What is the Item property of the form set to?  That's what determines what is shown in the form.  I suspect that your item property is set to only reference one gallery like

Gallery1.Selected

What you need to do is add something to the navigation that uses an UpdateContext to set a variable to the record and then set the Item property of the form to point to the variable.  Like this

Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected), Navigate('Update Escalation Report') 

 Then set the item property to selectedRecord



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Super User III
Super User III

You want to connect 2 Galleries to an Editform:

Assuming you have Gallery1 And Gallery2.

 

Insert a Button and Onselect put:

UpdateContext ({Gal1:!Gal1})

 

Then on the Items property of the Edit form put:

 

If(Gal1, Gallery1.Selected, Gallery2.Selected)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi,

 

I added your code to the Onselect property of the gallery. Is this correct? However, selectedRecord doesn't work when I change the item property of the form? 

 

Thanks,

 

Hi @Pstork1 

 

This worked however, I used this due to a slight typo:

 

Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected), Navigate('Update Escalation Report')

Set(VarMode, "Edit"); Select(Parent); Set(selectedRecord,Parent.Selected); Navigate('Update Escalation Report')

 

you used ',' instead of ';' after the set selected record variable. 

 

Thanks,

Dual Super User III
Dual Super User III

Sorry.  Too early and not enough coffee yet.  😁



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (12,037)