Power App has different screens and each screen is different approval forms. How to disable buttons like approve, reject and revise once the approval is done in each screen based on the SharePoint List Column Status. Once Submitted, the user should not be able to edit that particular screen. How to achieve this ?
Also how to by pass the approver screen if the requester is already a manager ?
Thanks a lot for your explanation. However my scenarios are different
1) To disable the buttons after the form being submitted:
My forms are Initiation Form, Section Head Approval Form followed by Department Manager Approval Form in the SharePoint Page. Hence UpdateContext will not work right. Because it is temporary variable. The Approver gets the link by Email.
a) Initiation Form
https://....InitiationForm.aspx
b) Section Head Form
https://....SectionHeadForm.aspx?ItemID=67
c) Dept. Manager Form
https://...DeptManagerForm.aspx?ItemID=67
2) To by pass the approver screen if the requester is already a manager:
I am not using Office 365 users connector. The Manager is fetched from the list and storing it in power app form screen as a label control like email address, Employee ID. How we can compare the logged in user is the manager in this scenario ?
Hi @Sajith ,
So you have 2 questions and I will answer them one by one.
1\ To disable the buttons after the form being submitted:
OnSuccess of the Form:
UpdateContext({Approved:true})
DisplayMode of those buttons:
If(Approved, DisplayMode.Disabled, DisplayMode.Edit)
OnSelect of navigation button which navigates to the form screens:
Select(Parent);Navigate(FormsScreen);EditForm(Forms);UpdateContext({Approved:false});
2\ To by pass the approver screen if the requester is already a manager:
Assuming you are using Office 365 users connector, please refer to below thread:
Solution is:
1\ OnStart of the App or OnVisible of the main screen:
ClearCollect(
myReports,
Office365Users.DirectReports(
Office365Users.MyProfile().Id))
2\ Navigate button -e.g. in a Gallery:
If(CountRows(myReports) > 0, Navigate(OtherScreen),Navigate(ApproveScreen))
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2