cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mattw112IG
Impactful Individual
Impactful Individual

Issue adding Edit form to a selected gallery item

I have a Gallery within a Gallery.  Not sure if it matters.  The first gallery really is just distinct dates.  The second Gallery is doing it's own filter and then using the date within the gallery item they are.

 

All that works.

 

Now I want to add an Edit form that opens if someone selects something.

 

But the edit form isn't opening with any data?

 

For item I have Gallery3.Selected and form mode is edit.

 

In this picture I have selected the first "SHIFT 1 8:00 AM - 8:00 PM" on 4/12/21 from the Gallery3

 

Screenshot 2021-04-27 123101.png

 

Thanks,

Terry

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Mattw112IG 

You will not be able to accurately reference the Gallery3.Selected record because Gallery3 will repeat in each row of Gallery1.  You will need to utilize a Variable for this to work properly.

In the OnSelect of Gallery3, you will need to implement this formula:

    UpdateContext({lclRecord: LookUp(yourDataSource, ID=ThisItem.ID)})

Then set your Item in the edit form to : lclRecord

 

Since you already have the form in Edit mode, there is no further need to explicitly execute a EditForm function.

 

I hope this is helpful for you.

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

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
iAm_ManCat
Super User
Super User

Hi,

 

Are you calling the EditForm(FormName) function during the OnSelect of that item within Gallery3 as well?

 

Cheers,

Sancho

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


RandyHayes
Super User
Super User

@Mattw112IG 

You will not be able to accurately reference the Gallery3.Selected record because Gallery3 will repeat in each row of Gallery1.  You will need to utilize a Variable for this to work properly.

In the OnSelect of Gallery3, you will need to implement this formula:

    UpdateContext({lclRecord: LookUp(yourDataSource, ID=ThisItem.ID)})

Then set your Item in the edit form to : lclRecord

 

Since you already have the form in Edit mode, there is no further need to explicitly execute a EditForm function.

 

I hope this is helpful for you.

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

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,003)