web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Edit Form only display...
Power Apps
Answered

Edit Form only displaying first gallery selection regardless of actual selection

(0) ShareShare
ReportReport
Posted on by 138

Hi all,

 

I'm relatively new to PowerApps and I'm working on an attendance log for our preschools. In it, I have a gallery that displays the students in each class. Once a teacher selects a student, the app takes her to a new page with the student's attendance record. I would like an Edit Form to pop up when she selects the arrow beside the date in the gallery. Right now I have the arrow's OnSelect set to EditForm(Form1), and Form1's Item set to Gallery2_2.Selected. However, this only displays the first date on the gallery regardless of which arrow I choose. I added a 'Done Reviewing' button whose OnSelect is set to ResetForm(Form1), but it doesn't change anything. Is this because it's reading from a nested gallery? Each student will have multiple rows in the SharePoint lists this app kicks back to, but each date will only have one entry. I'm hoping it's just something obvious that I'm overlooking!

 

Thanks in advance!

Gallery Selection Error.png
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,649 Most Valuable Professional on at

    Add Select(Parent); in front of the navigate command in the Arrow's OnSelect.  If you don't select the record before navigating it will default to the first record in the gallery, which is selected by default.

  • susannarae Profile Picture
    138 on at

    @Pstork1 unfortunately that did not do the trick 😕 

  • Pstork1 Profile Picture
    69,649 Most Valuable Professional on at

    Can you show me the code in the ONselect for the Arrow in the gallery and the Item entry for the Form?

  • Verified answer
    susannarae Profile Picture
    138 on at

    Okay, after more messing around I figured out the solution and thought I'd add it here for any future users!

     

    For the selection arrow, under OnSelect, I inputted: Set(varSelectedRecord, ThisItem); EditForm(Form1)

     

    (Instead of 'EditForm(Form1)' you can put 'Navigate(PageName)' if your Form is on a different page. Mine is on the same page.)

     

    Under 'Item' in Form1 I put: varSelectedRecord

     

    And that's it! It seems to work really well!

  • susannarae Profile Picture
    138 on at

    @Pstork1 I was finally able to figure it out on my own. I appreciate your willingness to help!

  • Pstork1 Profile Picture
    69,649 Most Valuable Professional on at

    Using a Variable will get it to display in the form, but may not work when you try to submit changes, since they will go to the variable and not the data source.  Its also not necessary.  You should be able to select the actual record in the gallery and then set the form to point at that selected record.

  • susannarae Profile Picture
    138 on at

    @Pstork1 When I changed the form and submitted it, the edits went through to the sharepoint list without issue. However, if there is a better way to make that connection then I'm certainly open to it! Give me a few minutes to copy the screen and add in your recommendations, then I'll send you the screenshots you requested.

  • Pstork1 Profile Picture
    69,649 Most Valuable Professional on at

    You don't need to do screenshots.  Just copy the OnSelect and Item properties and send those.

  • susannarae Profile Picture
    138 on at

    @Pstork1  Here are screenshots of the Form's Item and arrow's OnSelect.

    AL OnSelect.png
    AL Form Item.png
  • susannarae Profile Picture
    138 on at

    @Pstork1  sorry I saw this after I took the screenshots! Here they are.

    AL Form Item.png
    AL OnSelect.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard