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!