hi Experts
i am trying to create an approval app without power automate. in the app any records that is
1. created
2. modified
3. delete
we need an approval.
for record creation and rejection my app is working fine but when it comes to update/modified the record if it gets rejected the value in sharepoint is still the new one instead of reverting to old value.
currents situation:
i have one Approval and rejection button
when ever record is created or modified or deleted will be routed to this approval screen.
this is working fine
Whereas in my rejection if i reject it will gets rejected but the value in SharePoint wont change to the previous value.
how can i do that
my rejection code:
If(
!IsBlank(varRecds.ModifiedBy) && varRecds.ActiveStatus.Value = "Active",
Set(
varRecds,
Patch(
Forecast,
varRecds,
{
ApprovalStatus: "Rejected",
ActiveStatus: {Value: "Active"}
}
)
);
Office365Outlook.SendEmailV2(
varRecds.ModifiedBy,
"Approval for" & varRecds.EmployeeName & "'s has been rejected",
"Bummer, the Recdss is not compliant:<br>" & ",<br>Rejector:" & varUser.FullName,
{Cc: varUser.Email}
);
,
If(
IsBlank(varRecds.ActiveStatus),
Remove(
Forecast,
varRecds
)
);
Office365Outlook.SendEmailV2(
varRecds.CreatedBy,
"Approval for" & varRecds.EmployeeName & "'s has been rejected",
"Bummer, the Recdss is not compliant:<br>" & ",<br>Rejector:" & varUser.FullName,
{Cc: varUser.Email}
);
,
If(
varRecds.ActiveStatus.Value = "Inactive",
Set(
varRecds,
Patch(
Forecast,
varRecds,
{
ApprovalStatus: "Rejected",
ActiveStatus: {Value: "Active"},
TerminationDate: Blank(),
ModifiedBy: User().Email
}
)
);
Office365Outlook.SendEmailV2(
varRecds.ModifiedBy,
"Deletion Approval for" & varRecds.EmployeeName & "'s has been rejected",
"Bummer, the Recdss is not compliant:<br>" & ",<br>Rejector:" & varUser.FullName,
{Cc: varUser.Email}
)
);
ResetForm(Form1)
);
Set(
varReject,
false
);
Navigate(Welcome);


Report
All responses (
Answers (