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

Community site session details

Session Id : WB14GV9MoeZvMP5C5abrvB
Power Apps - Building Power Apps
Unanswered

Power App Screens and approval form update

Like (0) ShareShare
ReportReport
Posted on 18 May 2021 14:31:44 by 182

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 ?

  • Sajith Profile Picture
    182 on 19 May 2021 at 14:24:17
    Re: Power App Screens and approval form update

    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 ?

     

     

     

     

  • v-jefferni Profile Picture
    on 19 May 2021 at 02:45:11
    Re: Power App Screens and approval form update

    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:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Check-if-current-user-is-a-manager-of-anyone-in-AD/td-p/152191

     

    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.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete