Time entry using model driven PowerApps

Posted On January 10, 2019 by Dhruv Mehta Posted in 

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 

  1. Select the environment you want or go to the PowerApps admin center to create a new one.
  2. 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.
  3. In the solution, click on “New” and go to “App” and select “Model Driven Apps“.
  4. Enter the app name, description, image and the link to access the app designer.
  5. Add components to the app: Select the “Open the Site Map Designer”arrow to open the sitemap designer.
  6. 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
  7. On the app designer canvas select “Forms”, and then on the right pane under the Main Forms group select the “Time Entry Form”.
  8. On the app designer canvas select “Views”, and then select “My Time Entries By Date”.
  9. On the app designer toolbar, select “Save“.
  10. 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.
  11. 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:

  1. The model-driven application approach for building PowerApps is much simpler as
  2. compared to the canvas apps.

  3. Model-driven apps can be from the Dynamics 365 first-party applications, which also makes it easy to use.
  4. It is helpful in creating your own data source from scratch, using the Common Data Service as the foundation.
  5. The Unified Client Interface means your app will look the same whether it is being viewed on a phone, tablet or desktop.

Cons of model-driven PowerApps:

  1. 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.
  2. 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:

  1. Set the field as time zone independent. The change is permanent.
  2. Enter the time along with the date so as to get the entries on their proper day.

Share Story :