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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Employee Form Submissi...
Power Apps
Suggested Answer

Employee Form Submission & Approval Process to the appropriate manager

(1) ShareShare
ReportReport
Posted on by 27
Hi Team,

I have 3 tables
Employee user table

empid | empname | empemailid                         | designation| department |managerid | ClientEmailID
201       John Sena   john.sena@techgroup.com   Sw Eng           IT                   10               phil.cottege@techgroup.com

MangerTable
ManagerID | MGRname |MGRmailid                         | designation| department 
10       Tim.Richard   Tim.Richard@techgroup.com   Manager          IT                 

EmpTransactionTable
empid | empname | empemailid                         | UploadExcelFile |LastUpdatedDate| Status
201       John Sena   john.sena@techgroup.com | Excelfile               2024-03-11            Pending


I want to create a app once user login to the first page he should see the form 
empname -textbox
empemailid-textbox
mangeremailid-textbox
above column will populate automatically because we have mapping between employee and manger table
Uploadfile -attachements

submit button
 
When the user clicks Submit, the data is stored in the Employee Transaction Table.
An automated email with the attached Excel file is sent to both the Manager and the Employee for approval.
Once approved, the user receives a confirmation email stating that the form has been successfully submitted.
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,479 Super User 2025 Season 2 on at
     
    I do not really see questions, but here is what I think you are asking for. Please make sure in the future to write clearly the questions you have.
     
    Steps to do in the Flow
    1. Create a Power Automate Flow
    --For Inputs:
    • File Content input: You are going to pass the data from the Form
    • text : The email address of the user from the app. you will get this in the app from User().Email expression
    • Text: Optional have App pass in the email list of approvers
     
    2. Add a Start and wait for Approval Action
    -you will attach the file content that was passed into the Flow to the approval
    -you will need to have the Approvers emails. You can either pass that in from the App also, or you can hard code, or you can use an Environment Variable
     
    3. under the Approval put a Condition
    on the left put the Response dynamic property from the Approval Step
    is equal to
    Approve <== the word
     
    In the Yes side
    You can now email the person who put in the request to let them know it was approved and you have their email because you passed it in
     
    In the No side
    You can email them the Approvers comments so they know what to fix so they can re-submit again later.
     
    In the App Side
    1. Add the flow to your App
     
    2. In the OnSuccess property of the Form. Do not plus this RIGHT after your Submit it will fail to work correctly.
    --This is where you will call the Flow, passing it the File Name and Content, the logged in users email address and possibly (I suggest) the approvers email
     
    And... done.
     
    if this explains what you want, please mark as the answer. If you need help further buildig it, please start another thread, sharing what you do related to what I put above and I will be happy to help you finish it
     
    Cheers
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
  • Michael E. Gernaey Profile Picture
    53,479 Super User 2025 Season 2 on at
     
    Did I answer your questions? Do you have any more questions?
     
    What I put below is the structure you would do. while you can try CoPilot, as its in preview, you aren't gauranteed to get what you want. However, either way please let us know if either Answer is solid and or if you need more help.
     
    If one of them helps you please feel free to Mark them and maybe a like also.
     
    Cheers!!
  • Suggested answer
    CA1105 Profile Picture
    545 Super User 2025 Season 2 on at

     

    Step 1: Set Up Your Data Sources

     

    1. Connect to Your Data Source:

      • In PowerApps, connect to your database or data source where your tables reside. This can be SQL Server, SharePoint, or another supported service.

      • Ensure you have access to the Employee User Table, Manager Table, and EmpTransaction Table.


      •  


    2.  
     

    Step 2: Design the PowerApp

     

    1.  

      Create a New App:

       

      • In PowerApps, create a new app from blank or use a template.


      •  

    2.  

      Add a Form for Employee Details:

       

      • Use the Form control to create form fields for empname, empemailid, and manageremailid.

      • Set these fields to be read-only and configure them to auto-populate based on user login information.


      •  

    3.  

      Attachment Control:

       

      • Add an Attachment control for users to upload their Excel file.


      •  

    4.  

      Submit Button:

       

      • Add a Button control labeled "Submit".


      •  


    5.  
     

    Step 3: Logic and Automation

     

    1.  

      Auto-Populate Employee Details:

       

      • Use the User() function to get the logged-in user's email and query the Employee User Table to fetch details.

      • Similarly, query the Manager Table to get the manager's email based on managerid.


      •  

    2.  

      Submit Process:

       

      • On the submit button's OnSelect property, write a formula to:

        • Collect the form data and uploaded file.

        • Patch this data into the EmpTransaction Table.

        • Trigger a flow to send emails.


        •  


      •  


    3.  
     

    Step 4: Automate Email Notifications

     

    1. Set Up Power Automate Flow:

      • Create a new flow in Power Automate (formerly Microsoft Flow).

      • Trigger the flow when a new item is created in the EmpTransaction Table.

      • Use the email connector to send emails to the employee and manager with the uploaded file as an attachment.

      • You can use conditions within the flow to handle approval and send a confirmation email once approved.


      •  


    2.  
     

    Step 5: Testing and Deployment

     

    1.  

      Test Your App:

       

      • Run your app in PowerApps to ensure it works as expected. Test data population, file upload, and email notifications.


      •  

    2.  

      Deploy:

       

      • Share your app with relevant users in your organization so they can access it.


      •  


    3.  
     

    Example PowerApps Formula

     

    Here's a simplified example of how you might set up the OnSelect for the Submit button:

     
     plaintext
    SubmitForm(EmployeeForm);
    Patch(
    EmpTransactionTable,
    Defaults(EmpTransactionTable),
    {
    empid: EmployeeForm.LastSubmit.empid,
    empname: EmployeeForm.LastSubmit.empname,
    empemailid: EmployeeForm.LastSubmit.empemailid,
    UploadExcelFile: AttachmentsControl.Attachments,
    LastUpdatedDate: Now(),
    Status: "Pending"
    }
    );
    Flow.Run(EmployeeForm.LastSubmit.empemailid, ManagerEmail, AttachmentsControl.Attachments);
     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard