Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

How do I update my form when my gallery updates?

(0) ShareShare
ReportReport
Posted on by 821 Super User 2025 Season 1

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:
  • futr_vision Profile Picture
    821 Super User 2025 Season 1 on at
    Re: How do I update my form when my gallery updates?

    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.

  • ANB Profile Picture
    7,075 Super User 2025 Season 1 on at
    Re: How do I update my form when my gallery updates?

    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


  • jrletner Profile Picture
    715 Super User 2025 Season 1 on at
    Re: How do I update my form when my gallery updates?

    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)

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard