web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Approval Dashboard for...
Power Apps
Unanswered

Approval Dashboard for multi-step Dynamic Sequential Approvers

(0) ShareShare
ReportReport
Posted on by 2

Hello Team,

 

Am new to power apps, I have been building an approval dashboard for the Multi step Dynamic approvers Based on Tutorial By @RezaDorrani ,i modified the 'Export Reports' SharePoint List to Include the following Columns Approval Link ,Current Approver,  Next Approver, Previous Approver and Completed Approvers Column, 

Once user Submits Anew Request, I want to be able To pull up a list of approvers From the Expense Types SharePoint List and patch this approvers to the approvers column in Expense Reports SharePoint list and also get the current approver and Next approver

Once someone Logs in as the an approver and he is the current Approver, he should be able to see the request and approve by Launching the Approval Link from Power Apps, 

Then Expense Report list should then be updated by patching the current approver as the completed and previous approver and the next approver as the Current approver, and the Flow continues that way, The New Current approver should be able to go through the same process as the previous approver, if the current approver is the Final approver update the approval status and move the current approver to the completed approver Column, Below are some Screen Shots to guide, 

i was trying to use concepts by @krinshana rachakonda in his tutorial building dynamic approval without flow

CODE TO SET CURRENT APPROVER AND NEXT APPROVER AT START OF THE FLOW

Set(
varSelectedApprovers,
// NewRequestForm.LastSubmit
LookUp(
'Expense Types',
Title = NewRequestForm.LastSubmit.'Expense Type'.Value
)
);
//ResetForm(Self); RequestHide()
//ResetForm(Self); RequestHide()
Set(
varSubmittedExpenseItem,
// NewRequestForm.LastSubmit
LookUp(
'Expense Reports',
ID = NewRequestForm.LastSubmit.ID
)
);
Set(
BlankPerson,
Table(
{
Claims: Blank(),
DisplayName: Blank(),
Email: Blank(),
Department: Blank(),
Picture: Blank(),
JobTitle: Blank()
}
)
);
If(
varSubmittedExpenseItem. 'Approval Status'. Value = "Pending" && IsBlank(First(varSubmittedExpenseItem.'Completed Approvers').DisplayName),
ClearCollect(
varApprovers,
varSubmittedExpenseItem.Approvers
);
Set(
varFirstApprover,
Table(First(varApprovers))
);
Remove(
varApprovers,
Table(First(varApprovers))
);
If(
CountRows(varApprovers) > 0,
Set(
varNextApprover,
Table(First(varApprovers))
),
BlankPerson
);
Set(
varUpdatedItem,
Patch(
'Expense Reports',
varSubmittedExpenseItem,
{
Approvers: If(
NewRequestForm.LastSubmit.Amount > 500,
varSelectedApprovers.Approvers2,
varSelectedApprovers.Approvers1
),
'Current Approver': varFirstApprover,
'Previous Approver': BlankPerson,
'Completed Approvers': Table(
{
Claims: Blank(),
DisplayName: Blank(),
Email: Blank(),
Department: Blank(),
Picture: Blank(),
JobTitle: Blank()
}
),
'Next Approver': varNextApprover,
'Approval Status': {Value: "Pending"}
}
)
)
)

CODE UPON CLICK OF APPROVE BUTTON BY APPROVER

Set(
varUpdatedItem,
LookUp(
'Expense Reports',
ID = varUpdatedItem.ID
)
);
Set(
varMsgFlag,
true
);
Set(
BlankPeople,
Table(
{
Claims: Blank(),
DisplayName: Blank(),
Email: Blank(),
Department: Blank(),
Picture: Blank(),
JobTitle: Blank()
}
)
);
If(
varUpdatedItem.'Approval Status'.Value = "Pending" && First(varUpdatedItem.'Current Approver').Email = User().Email,
/* ClearCollect(
colCompletedApprovers,
//varSubmittedExpenseItem.'Completed Approvers'
varUpdatedItem.'Completed Approvers'
//varUpdatedItem.'Previous Approver'
); */
ClearCollect(
colCompletedApprovers,
//varApprovedTask.'Assigned To'
//varSubmittedExpenseItem.'Current Approver'
varUpdatedItem.'Current Approver'
);
ClearCollect(
colApprovers,
//varSubmittedExpenseItem.Approvers
varUpdatedItem.Approvers
);
ClearCollect(
colRemainingApprovers,
colApprovers
);
ForAll(
colApprovers,
RemoveIf(
colRemainingApprovers,
ThisRecord in colCompletedApprovers
)
);

//If(
//varUpdatedItem.'Approval Status'.Value ="Pending"&& First(varUpdatedItem.'Current Approver').Email=User().Email,
Set(
varUpdatedItem,
Patch(
'Expense Reports',
varUpdatedItem,
{
'Previous Approver': varUpdatedItem.'Current Approver',
//'Previous Approver': varApprovedTask.'Assigned To',
'Completed Approvers': colCompletedApprovers,
'Current Approver': If(
CountRows(colRemainingApprovers) = 0,
BlankPeople,
Table(First(colRemainingApprovers))
),
'Next Approver': If(
CountRows(colRemainingApprovers) = 1,
BlankPeople,
Table(
First(
RemoveIf(
colRemainingApprovers,
Email = First(colRemainingApprovers).Email
)
)
)
),
'Approval Status': If(
IsBlank(First(colRemainingApprovers).DisplayName),
{Value: "Approved"},
{Value: "Pending"}
)
}
)
)
);
Set(
varMsgFlag,
false
);

 

Any Help will be highly appreciated thanks

 

Reports.png
Employee View.png
Approver View.png
Categories:
  • zuurg Profile Picture
    546 Super User 2024 Season 1 on at

    What is it that you're needing help with exactly?  How to patch a Person or Group field type?

  • jelaju Profile Picture
    2 on at

    hello @zuurg am trying to  loop through all the collection of approvers each time updating the "Export Report" SharePoint List Current Approver, Next Approver, Previous Approver, Completed Approver Columns So that in the Approval Dashboard Only the Current Approvers Sees the Request and Can Approve Until all the Approvers are Done, so that after the Final Approver has approved The Current Approver Column will be blank, Next Approver Blank then the Completed Approver Column will have all the approvers who have approved

    Thank You

    see the Screenshot Below as an Example

    Completed Approval.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard