Modify table forms in Dataverse

Completed

In the previous lesson, you learned about modifying table views. Now, it's time to learn about modifying table forms.

Overview of forms

Previously, using an Excel workbook to track accidents provided users with the ability to log and modify accident reports. With that method, users would insert a new row for new accidents or modify existing accidents directly in the spreadsheet.

A table form provides a different way to for users to log new accidents, modify existing records, or delete records. Forms offer a simple way for users to input and validate data, without simply adding a row of data.

Forms are part of the user interface (UI) for each table in Dataverse, and they allow application users to interact with the data being stored in underlying tables. Also, by using forms, the app maker can completely customize the data interaction for different users based on a security role.

By default, all tables in Dataverse have standard forms. However, many organizations might still need to customize and modify the out-of-the-box forms to meet business needs. When creating and/or modifying forms, you should also consider the end-user experience. Take time to customize the behavior and appearance of the forms during development and testing.

In this section, you'll learn how to customize forms to display the fields that users will update when interacting with your model-driven app. The goal of forms is to allow the user to create, update, and delete records efficiently. This process could involve placing similar fields into groups that make sense to the business user, or you can put them in order. In the next exercises, you'll modify the Main form for all tables. Then, you'll use these forms as the main place where app users will interact with the data.

For more information, see Create and design model-driven app forms.

Modify default table forms

We'll walk through how to do this with our EmployeeTable first. When modifying any form, you'll follow these basic steps:

  1. From the Power Apps homepage, select Tables.

  2. Select the Tables menu and then search for the table you're looking for. In this case we're looking for the EmployeeTable that you created in the previous module. You can search for it by typing *employee *in the search field (top right hand corner).

  3. Select the table and then select Forms from the Data experiences pane.

    Screenshot of the Tables, EmployeeTable editor screen with Forms highlighted from the Data experiences pane.

  4. Find and select the Main information form to navigate to the forms design experience.

  5. Your Form editor screen opens in the same browser tab. Similar to the View editor, you see the Table columns panel showing columns from your data table, your form canvas appears in the center, and the properties panel on the right has a list of properties for the selected item. Here's an image of the Form editor screen.

    Screenshot of the Tree view with the Information section expanded and highlighted.

  6. To get your form looking like the image above, add the Owner (a Dataverse standard field that identifies the user who created the record in the table) to the Header section of the table by dragging the Owner field and then dropping it to the upper right of the header.

  7. Add the fields that a user will enter for employees in the General section of the form. Select or drag the following fields into the General section. Put the fields in the following order (refer to the image above):

    1. EmployeeId

    2. EmployeeName

    3. EmployeeDOB

    4. EmployeeEmail

    5. EmployeePicture

  8. Let's make the EmployeeId field Read-only, since it's automatically generated and we don't want a user to modify it. Select the EmployeeId field, and on the right under Properties, select the Read-only checkbox.

    Screenshot of the Employee ID properties with the Read-only label selected.

  9. To complete the changes, you need to select Save and Publish in the upper right of the command bar.

    Now, you can test your form and create a few employee records.

  10. Return to your main EmployeesTable screen.

  11. Select the Edit button from the command bar. This opens up the EmployeesTable editable data screen, which is similar to an Excel spreadsheet.

  12. Though we could input data directly onto the bottom of the table, we want to exercise our form. From the command bar, select the down pointing chevron just to the right of the + New row button, and select New row using form.

    Screenshot of the new row using form option.

  13. Enter the following information into the form.

    • EmployeeName - Oscar Ward

    • EmployeeDOB - 10/5/1985

    • EmployeeEmail - oward@contoso.com

  14. No need to worry about the EmployeeID, it will automatically update when you save it. Select Save & Close.

  15. Let's add another employee using our form with the following information:

    • EmployeeName - Serena Davis

    • EmployeeDOB - 8/15/1996

    • EmployeeEmail - sdavis@contoso.com

If you did this correctly, you'll now have two employees on your EmployeeTables. Now that you understand how to modify a form and how to use it for data entry, you know the basics. We'll reenforce this in the next exercise.