cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Post Prodigy
Post Prodigy

FORM DOES NOT UPDATE EVERY TIME THE USER EDITS


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!

17 REPLIES 17
VijayTailor
Resident Rockstar
Resident Rockstar

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

Gorilla_8
Post Prodigy
Post Prodigy

@VijayTailor 

 

Ok, so when is true, what I do? 

When the Form.Unsaved = true I do what?

VijayTailor
Resident Rockstar
Resident Rockstar

Means Suppose if you Modified the data in the Form then Save Button enable automatically then you can click on save button if you click for edit and not modify any data then button remains disabled .

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
Post Prodigy
Post Prodigy

@VijayTailor 

 

Ok, but I edited an item and clicked to save and then I opened it again and it is disabled, what do I do?

VijayTailor
Resident Rockstar
Resident Rockstar

Edit any Value then Button Again enable. it means if you not modify any value in the  Form Button always in disabled State.

Gorilla_8
Post Prodigy
Post Prodigy

@VijayTailor 

 

Ok, I did that, and the button was not disabled, I redid the form without editing to test and I get the same error above:

 

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

 

VijayTailor
Resident Rockstar
Resident Rockstar

Hi @Gorilla_8 ,

if possible plz share the video, so I can try the same at my end, after that hope, i will suggest you some idea for your requirement.

Gorilla_8
Post Prodigy
Post Prodigy

I found a solution, I put another card on my form and put this code before the submit:

Refresh(DataSourceName)

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (1,461)