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 / FORM DOES NOT UPDATE E...
Power Apps
Answered

FORM DOES NOT UPDATE EVERY TIME THE USER EDITS

(0) ShareShare
ReportReport
Posted on by


I have a variable called "varMode" and it contains three types:

 

"varMode = New" = FormMode.New

"varMode = Edit" = FormMode.Edit

"varMode = View" = FormMode.View

 

And in the item property of the form:

 

MyGalleryName.Selected

 

What is happening:

 

If I edit the item once it updates, however if I am going to update and update (save the form again) it does not update the form.

 

Here my code in the property "OnSelect":

 

If(
 FormAnaliseNew.Valid;
 Patch(
 FichaDeAnalise;
 {ID: GaleriaAnálise.Selected.ID};
 FormAnaliseNew.Updates
 );;
 Set(
 varID;
 Last(FichaDeAnalise).ID
 );;
 Set(
 varPopSalvar;
 false
 );;
 /*SubmitForm(FormSalvarUltimoStatusEStatusAtual);;*/
Notify(
 "As informações da análise foram salvas";
 NotificationType.Success
 );;
 ResetForm(FormSalvarUltimoStatusEStatusAtual);;
 Navigate(ANÁLISE);
 Notify(
 "Não foi possível salvar. As informações “Área Demandante” e “Projeto (nome sugerido) são de preenchimento obrigatório!";
 NotificationType.Error
 );;
 UpdateContext({varBorder: true});;
 ResetForm(FormSalvarUltimoStatusEStatusAtual)
)

 

The error is on this part: 

 

Patch(
 FichaDeAnalise;
 {ID: GaleriaAnálise.Selected.ID};
 FormAnaliseNew.Updates
 )

 

I don't know how to fix it! I tried every post here on community...

Thank you very much for the help!

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Gorilla_8 ,

    Once you Update the Data using From Gallery will Update. So instead of Giving direct Gallery reference, you can set the global variable on the ONSelect of Gallary Record.
    and use the same variable for the Form Item Property.
    Set(EditThisItem,ThisItem);
    in From Item Property Pass this variable inside the Item Property - EditThisItem.

    Hope this will help you to resolve your Issue.

    Thanks

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay



     

  • Gorilla_8 Profile Picture
    on at

    Hi @VijayTailor 

     

    I already got the variable

     

    To edit the item on gallery I put this: Set(varEditar;ThisItem)

     

    To see item: Set(varConsultar;ThisItem)

     

    And I keep the error on "Patch"

     

    On my form item I put the variable "varEdit", and I got an error on patch

  • Vijay Tailor Profile Picture
    2,961 on at

    @Gorilla_8 
     I did not understand, one thing if you are using form then why you using the Patch function.

    Can you please elaborate on your issue with your proper details?

    Thanks

  • Gorilla_8 Profile Picture
    on at

    Because the function "SubmitForm" doesn't work

     

    When I edit the same item several times it doesn't update and I have this error:

     

    I just want the user to be able to edit and save the item over and over again

     

    There are conflicts with the server changes. Reload. Server response: Failed AnalysisFile: incompatible ETG. clientRequestId: 692e79cc-5a92-4582-99a2-154c476609ca serviceRequestId: 692e79cc-5a92-4582-99a2-154c476609ca

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Gorilla_8 , 

    you can try the below approach without patch but with submit the form.


    Suppose "varEdit" global variable set for the Form Item.

    Now you Update the Value using Submit Form but you not updated the variable "varEdit" and again you submitting the data its throwing an error.

    So for resolving this error using Submit form function and Set the OnSuccess Property of the Form and Update the variable value like below. 
    Set(varEdit,FormName.LastSubmitted) So Now When even every you update the form even How may time you update the Form, Hope you will not get this error.

     

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay




  • Gorilla_8 Profile Picture
    on at

    @VijayTailor 

     

    Sometimes I got the error, and after I try again and works, but some fields don't work!

    Why??

  • Vijay Tailor Profile Picture
    2,961 on at

    @Gorilla_8 

    Hope you will Not Get this error if you use the above approach.

    One addon the above approach.
    For Save Button Set DisplayMode Property. Like FormName.Update =true,DIsplayMode.Diabled,DisplayMode.Edit)

    This will ensure you like if your Form Modified then only Save Button is enabled for Save the Data. 

  • Gorilla_8 Profile Picture
    on at

    @VijayTailor 

     

    Some field, like choice columns don't the edit

  • Gorilla_8 Profile Picture
    on at

    @VijayTailor 

     

    Like this? 

    I got an error:

     

    Gorilla_8_0-1613589538214.png

     

  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Gorilla_8 ,

    Please Correct the Function Name see the below Reference - 

    VijayTailor_0-1613624641157.png

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard