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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How do I update my for...
Power Apps
Unanswered

How do I update my form when my gallery updates?

(0) ShareShare
ReportReport
Posted on by 831 Moderator

I have a gallery that populates a form when an item is selected. This form can be edited. When the form fields are edited and submitted the gallery updates but the form doesn't. Tt shows the old values until I select on the item again in the gallery. How do I get the form to update on submit?

Categories:
I have the same question (0)
  • jrletner Profile Picture
    720 Super User 2025 Season 2 on at

    Hi @futr_vision ,

     

    If you need the form to be visible at the time the data is submitted (versus leaving the form and coming back to it), you might try placing a datasource refresh or a ResetForm option in the OnSuccess property of the form

    Refresh datasource:

    Refresh(datasource)

     

    ResetForm option:

     

    ResetForm(formName)

     

  • ANB Profile Picture
    7,223 Super User 2025 Season 2 on at

    Hi @futr_vision , When you select the item in gallery, have this code:

    Set(gblvar_SelectedRecord, ThisItem)

    The Items property of form will be gblvar_SelectedRecord and the data source form will remain same as you already have.

    On submit button, have this code:

    SubmitForm(FormName);
    Refresh(DataSource);
    Set(gblvar_SelectedRecord, FormName.LastSubmit)

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

    I hope this helps.

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

    Thanks,
    ANB


  • futr_vision Profile Picture
    831 Moderator on at

    Funny you mentioned this. I was thinking I should set a variable for the gallery item and then use that for my form's item property. Let me give this a try. 

     

    One thing. Wouldn't it be better to use this on the On Success property of the form?

    Set(gblvar_SelectedRecord, FormName.LastSubmit)

     

    NOTE: I think I had tried Refresh but it gave me an error. I'll try again.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard