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 / Submit Form in new gal...
Power Apps
Answered

Submit Form in new gallery entry

(0) ShareShare
ReportReport
Posted on by 28

Hello, 

 

I've created a gallery app. When a user creates a new entry in the gallery, other users can "leave a comment" within that entry. The problem I'm having is, whenever a user creates comment within a new created gallery, lets say the second, third or forth entry within the gallery,  it redirects me to the detail screen in the first entry instead of its parent entry. 

 

Currently, the submit button says  OnSelect  says SubmitForm(Form1_1)

 

can someone help? 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,926 Most Valuable Professional on at

    Hi @IndianaGirl ,

    The issue is not the SubmitForm() as that simply submits the form. The issue is the record the form is displaying by Default which will be the last record that was selected from your gallery, which is probably the Item of the Form (GalleryName.Selected). If you want to immediately display a new record created in a Form, there are some changes needed. There are several ways of doing this (and I am assuming you are using SharePoint here), but I use this one.

    On the OnSelect of your gallery, put this ( I assume you are navigating to the screen)

    Set(gblID,ThisItem.ID);
    Navigate(YourSreenName) 

    Then the Item of your Form is

    LookUp(
     YourListName,
     ID=gblID
    )

    Now you can do the last piece - on the OnSuccess of the form

    Set(gblID,Self.LastSubmit.ID);
    EditForm(Self)

    This will show the new record you have just saved with the form in Edit Mode.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    v-albai-msft Profile Picture
    Microsoft Employee on at

    Hi @IndianaGirl ,

    How are things going? Is the solution provided by @WarrenBelz useful for you?

    If your issue is not resolved, please don't hesitate to let us know.

    Best regards,

    Allen

  • IndianaGirl Profile Picture
    28 on at

    @WarrenBelz sorry for the delay. I was finally able to work on this. Thank you for your help!. You rock!

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard