This has been driving me crazy. I had this issue several weeks ago, and fixed it by recreating the button and pasting the code back in, but now it is starting again.
Sometimes the code will actually remove the 'Approved' status from the MgrApprovalStatus column for the same record in Sharepoint.
OnSelect actions:
Set(
varITApproval,
"Approved"
);
Patch(
ITOnboardingForm,
LookUp(
ITOnboardingForm,
ID = ThisItem.ID
),
{ITApprovalStatus: varITApproval}
);
SubmitForm(ITForm);
Refresh(ITOnboardingForm);
Navigate(BrowseScreen1);
The initial screen is using a gallery, and there is a lot of code in the "Next Arrow", not sure if that is where the issue lies:
Refresh(ITOnboardingForm);
Select(Parent);
Set(
varRecord,
ThisItem
);
Set(
formType,
"Edit"
);
Set(
selectedItem,
ThisItem
);
If(
selectedItem.HRApprovalStatus = "Draft",
EditForm(NewUserForm);
Set(
varTitle,
selectedItem.Title
);
Set(
varHRStatus,
selectedItem.HRApprovalStatus
);
Set(
varSupervisor,
selectedItem.Supervisor
);
Navigate(
NewUserForm,
ScreenTransition.None
),
selectedItem.ITApprovalStatus = "Approved",
Navigate(Review),
selectedItem.MgrApprovalStatus = "Approved",
EditForm(ITForm);
Set(
varITApproval,
selectedItem.ITApprovalStatus
);
Set(
varSupervisor,
selectedItem.Supervisor
);
Navigate(IT_Approval),
selectedItem.HRApprovalStatus = "Approved",
EditForm(MgrForm);
Set(
varMGRApproval,
selectedItem.MgrApprovalStatus
);
Set(
varSupervisor,
selectedItem.Supervisor
);
Navigate('MGR Approval'),
Navigate(Review)
)