Hello,
I have a SharePoint list that I am customizing it using PowerApps forms.
In this list, I have three columns and are single lines of text (Approval I, Approval II, Approval III).
In this form, I have a dropdown where the users will pick their email addresses, and submit.
What I want to achieve is the following:
On submission, I want to update the above fields that I have mentioned to "Approved". Besides, before updating the field I want to check if it's already approved or not to notify the user based on the response ("This item is already approved, you cannot approve it again!") or ("This item has been successfully approved!").
The submit button will react to all the users in the dropdown with the same process in different fields.
I was able to achieve it using a toggle when I had two approvals only, please have a look at the below formula:
Set(
VManager2,
Toggle1.Value
);
Set(
vID,
SharePointIntegration.SelectedListItemID
);
If(
VManager2,
Set(
vNotApproved,
IsBlank(
First(
Filter(
'Employee re-joining report',
ID = vID &&
ApprovalI = "Approved"
)
)
)
),
Set(
vNotApproved,
IsBlank(
First(
Filter(
'Employee re-joining report',
ID = vID &&
ApprovalII= "Approved"
)
)
)
)
);
If(
!vNotApproved,
Notify(
"This item is already approved, you cannot approve it again!",
NotificationType.Error
),
If(
VManager2,
UpdateIf(
'Employee re-joining report',
ID = vID,
{ApprovalI:"Approved"}
),
UpdateIf(
'Employee re-joining report',
ID = vID,
{ApprovalII:"Approved"}
)
);
If(!VManager2,
Notify(
"This item has been signed successfully!",
NotificationType.Success
)
)
);Currently, I have more than two approvals, I just want to know would be the updated function to be able to achieve the above scenario. So I can continue to implement the same logic for other approvals(4-5..).
I would be most grateful if you please provide an example and explain it in detail.
Any help is highly appreciated.
Thank you!

Report
All responses (
Answers (