Time entry using model driven PowerApps
Introduction:
Managers and employees need a good time entry application to record worked hours for billing, payroll, or operations. That information is used to automate payroll, invoice clients, and keep a business operating efficiently.
While there are many good off the shelf time entry applications, the pre-built time entry capabilities of the model-driven approach in PowerApps provides a no-code or low-code component-based approach to facilitate the development of such an application development atop the Common Data. Model-driven apps run with the new Unified Interface client, which provides a responsive and accessible design running in browsers and on popular mobile devices. This app type composes multiple component types including dashboards, forms, views, charts, and business processes which together form a great UI.
In this article we will explore the steps to set up your own time entry application in PowerApps using the existing Time Entry entity.
Steps
- Select the environment you want or go to the PowerApps admin center to create a new one.
- Go to solutions, click on the “+ New Solution” button and enter the required details for creating a new solution and then click on “Create” option.
- In the solution, click on “New” and go to “App” and select “Model Driven Apps“.
- Enter the app name, description, image and the link to access the app designer.
- Add components to the app: Select the “Open the Site Map Designer”arrow to open the sitemap designer.
- On the sitemap designer select the new subarea and in the right pane select the properties tab. Then select the following properties:
- Type: Entity
- Entity: Time Entry
- On the app designer canvas select “Forms”, and then on the right pane under the Main Forms group select the “Time Entry Form”.
- On the app designer canvas select “Views”, and then select “My Time Entries By Date”.
- On the app designer toolbar, select “Save“.
- The App can now be validated to check for any error. The time entry entity is dependent on many other entities which will be shown as dependencies to be added during the validation process. All these entities need to be added so as to indicate all the resources, projects, tasks for each project and ensure they are shown properly.
- Now save and publish the application and you can directly execute the app from the app designer itself, by clicking on the “Play” button.
Working with the new app:
To work with your new time entry app, download the on your mobile device and login with the credentials into the time entry application as shown below.
You can enter a new time entry by clicking on the “New” button, which can be accessed within the menu area.
A message box is displayed and the status of the time entry changes to submitted.
An existing time entry can be recalled for modification using the “Recall” button icon and a message box is displayed and the status of time entry changes to draft.
For time entries such as absence or vacation, manager approval is required. Thus, when you type in absence or vacation it is mandatory to enter the manager name and an approval request is sent to the manager.
When the manager name is included, the time entry is submitted and the approval request goes to the manager, who can either approve or reject the request.
The status of the time entry changes to approved, when the manager completes the approval process.
All the respective time entries managed via your Time Entry app are reflected in the Dynamics 365 Project Service Automation first-party app if it is in use.
To share the model-driven application among multiple users, go to the solution and on the app select the share option.
Conclusion
Pros for model-driven PowerApps:
- The model-driven application approach for building PowerApps is much simpler as
- Model-driven apps can be from the Dynamics 365 first-party applications, which also makes it easy to use.
- It is helpful in creating your own data source from scratch, using the Common Data Service as the foundation.
- The Unified Client Interface means your app will look the same whether it is being viewed on a phone, tablet or desktop.
compared to the canvas apps.
Cons of model-driven PowerApps:
- The model-driven approach does not have a flexible interface, thus in such cases where we need to customize, the canvas PowerApps approach is recommended.
- It does not provide flexibility with development of functions and controls.
There are still problems to solve with the time entry app described in this article. In particular, the time entry has a field date of the data type Date-Time which is set to the UTC time zone, thereby resulting in time entries based on UTC time zone. The solution to the above problem is as follows:
- Set the field as time zone independent. The change is permanent.
- Enter the time along with the date so as to get the entries on their proper day.