@Author (1)

How to create a timesheet app in teams using power apps and power automation

Author: Ramya Reddy 

–DxEngineers Employee

 

Overview:: Microsoft provided us with a great opportunity to create Apps in Microsoft teams and automate the process. I have created Timesheet for employees to enter their allocated work in the App. The lead will approve the details after checking; data is generated every day at a scheduled time. Created an App using Screens, containers, galleries, Forms. Text boxes and labels are used to enter the details as per the requirement, added submit, delete, and edit Icon controls to the form and applied formulas for the properties for these Icons. Need to preview and check whether the App is working properly or facing any complex issues. Next comes the database. Here I have created a table in the testing environment with the column names and data types same as in the App. Test it by entering details in the table and should appear in the App. Final step data need to store data on daily basis .Created a scheduled flow in the same testing environment and applied rules like given access to the One Drive , generated Timings and run the flow . 

Steps I followed while creating Timesheet App. 

Open Microsoft teams and click on the Icon Apps which is on the left side. 

Search for power Apps and Click on the start Button which provides you an option to create an App. 

  

         

  • Click on the New App and need to select the environment. Here I have created Testing and Click on create. 

 

  • Select Testing and Enter App Name 
  • .  

 I have created an App DXEngineers . 

  • Open the App, Screen will pop Up and Choose Four containers on the screen, one vertical Gallery and Form. 
  • After Creating All the details are resided on left side. So, it makes easy to understand how many Galleries, containers, Screens are used for this App.
  •  
  • Left Container:    

                   TEXT:  In the Text box mentioned the name DXEngineers Employees. 

                    New Record:  Which creates a new record by ONSELECT property   

                                            NewForm(mainform); UpdateContext({newMode: true}); 

  •   After Filling the details in Main Form, it shows on the left Container which employee has logged in. If the employee updated the results administrator has to approve, then it shows in green color. If the details are not updated, it shows orange color. 

                                     

  • Right Container: 

                      It has main form in container.  Inserted 8 Textboxes and labels as per the requirements. Each column is selected as per the Datatypes. 

                 Main Form: Employee Name (Required and data type: single line Text), 

                                            Employee ID (data type: Number), 

                                            Date and Time login (Data and Time), 

                                            Work Type (Single line Text), 

                                            Work Description (Multiple line Text), 

                                             Hours Spent (Hours), 

                                             Status (Choice), 

                                             Challenges (Mutli line Text).   

               

               

  • Delete Icon will delete the data.
  • Right Icon will add a new record.

 Tables 

Go to the Home Page, at bottom of the page click see more, Testing environment 

Will open. Create the table as per the requirements. 

Created a Table In testing Environment DXEngineers Employees. 

  • Created the same columns based on datatypes as per the requirement. 
  • I choose Employee as required. Date and time, single line Text and multiple line Text. 
  • Data entered in the table will reflect in the power Apps. 
  • Whatever the changes made in the power Apps will show in the table. 

  • POWER AUTOMATE 
  • To store the data automatically in a database powerAutomate is used. 
  • Here Data is stored in One Drive. 
  • Open the power Automate and start creating Scheduled Flow. 

 In the recurrence Tab enter the scheduled time. 


 This Flow is created every day at 5. 00A.M in the morning. So that every employee finishes Updating their work details in the App. 

  • In Recurrence: Enter Time Schedule, 

                List Rows: Enter the table name, 

                Create Csv table: To represent columns in the table, 

                Create file: In the path enter the folder name name created in database, 

                                      Table name with current data and Time now with .CSV and  

                                       Output will be in .CSV pattern.                     

  • Report will be generated in One Drive Every day. 

 I followed Reza Dorran You tube Videos For power Apps 

Properties and Formulas used in power Apps 

  • Items         :  ‘DXEngineers Employees’. 
  • On Select:    NewForm(mainform); UpdateContext({newMode: true}); 
  • On Success: UpdateContext({ CurrentItem: Self.LastSubmit, editMode: false,        newMode: false}). 

 This print shows clearly how many containers, Galleries, Layouts are used for this App. 

Advantages: 

  • Employees can update their details. 
  • so, it can prevent loss of data. 
  • Time Consuming Process. 
  • If anything denied orange pop up will show on Gallery. 

Enhancement: 

  • After running the scheduled flow, every day new sheet is created in database (One Drive). It should be enhanced like in one sheet new row need to be added every day rather than creating new one.