Reader small image

You're reading from  Microsoft Power Apps Cookbook, 2e - Second Edition

Product typeBook
Published inAug 2022
PublisherPackt
ISBN-139781803238029
Edition2nd Edition
Right arrow
Author (1)
Eickhel Mendoza
Eickhel Mendoza
author image
Eickhel Mendoza

Eickhel Mendoza is a Microsoft Business Applications MVP with many years of experience in project management, Microsoft Azure development, and Microsoft Power Platform technologies. He is a team lead of the Business Apps department and oversees all Microsoft 365 and Power Platform projects. He has contributed to significant community events such as the Power Platform World Tour, Global Azure Bootcamp, Microsoft 365 Developer Bootcamp, and Dynamics 365 Saturdays. He coordinates the TenerifeDev and Power Platform Canarias user groups with a group of like-minded developers eager to share their knowledge in different technologies. Eickhel is also a member of the organizing committee of the Business Applications Summit Spain.
Read more about Eickhel Mendoza

Right arrow

Creating an incident tracking solution – setting up the data source

Tracking processes is a necessity for customers everywhere. As in any development process, the first step is to gather all the requirements needed to fulfill the business need; this will then help us design the data structure to support our application.

As for the data source, this recipe will set up the required fields in a SharePoint list while also applying certain settings to make it as performant as it should be.

Getting ready

Before diving into developing solutions with Power Apps, you will need a Microsoft 365 subscription. Please refer to the Preface section for suggestions on getting a playground to build your apps.

We will use SharePoint as the data source for this recipe, so we will start by creating a list. The actual list creation process is pretty straightforward, leaving plenty of time for our application design.

SharePoint Online performance considerations

When working with SharePoint Online, you need to remember that we are working on a web application with specific response and performance levels to provide the best user experience. To meet this, Microsoft has set a view threshold of 5,000 elements per list. Even though a list can hold up to 30 million items, querying data exceeding this limit will result in platform errors, making the list unresponsive.

These are a few recommendations to keep your lists performant:

  • Set an index for the columns you wish to filter. Remember to do this beforehand since you cannot change it if you have exceeded the threshold.
  • Prepare views for lists that might carry a large number of items by segment. Examples can be categories, years, and departments.
  • Build your views with fewer than 12 People, Lookup, or Managed metadata fields to avoid performance issues.

For reference on this subject, check out the following links:

How to do it…

  1. Go to your SharePoint site. We will need to create two lists.
  2. Select + New and then List. This action will open a dialog with several list templates for you to select. Click on Blank list, input Clients as the Name, leave the Description field blank, and click on Create. This action will create a list with a default structure:
Graphical user interface, application  Description automatically generated

Figure 1.1: List creation procedure

  1. To add and update columns, click on the gear icon in the top-right corner and select List settings. This action will open all the configuration options for this list, but we will be focusing on the Columns section.
  2. First, click on the Title column to edit it. We are doing this for user interface reasons. This field lets you open the selected record quickly from the list view, so we will set it as the client’s name. Once it opens, rename the column name to Name and click OK.
  3. To add the rest of the fields, click Create column and set the column name and type as seen in the following table:

Column name

Column data type

Required

Name

Single line of text

Yes

Address

Multiple lines of text

No

Phone

Single line of text

No

Email

Single line of text

No

Table 1.1: Clients list columns

  1. When adding the Address column, specify the type of text to be Plain text to prevent formatting issues later when designing your app. We need to make this change because, otherwise, SharePoint will store this data in HTML to maintain the formatting and will make the text look different from the rest of the app.
  2. Repeat steps 2 and 3 for the Incidents list. Rename the Title column to Incident and set the columns as seen in the following table:

    Column name

    Column data type

    Required

    Incident

    Single line of text

    Yes

    Customer Name

    Lookup

    Yes

    Date

    Date and Time

    Yes

    Priority

    Choice

    Yes

    Comments

    Multiple lines of text

    No

    Table 1.2: Incident list columns

    The Choice type means that it will use a list of items to choose from, and the Lookup type indicates that this column will link to another list that holds another set of data. In this case, we will use this column to relate the incidents to the clients.

  1. To add the Customer Name column, select the Lookup type and from the Get information from dropdown, choose the Clients list we created before. Leave the rest of the options as the default.
  2. For the Priority column, select the Choice type and replace the choices with High, Medium, and Low. Set the Default value as Low
  3. Lastly, change the text type to Plain text for the Comments column.

Now that we have our lists in place, let’s see how this list and its relationships come together.

How it works…

After setting up our data source, we can now start entering some test data to use in our app.

  1. Click on the gear icon in the top-right corner, select Site contents, and select the Clients list:
Graphical user interface, text, application  Description automatically generated

Figure 1.2: Site contents option

  1. Now, let’s click on + New to add some random test data:
    • Name: Yennu Enterprises
    • Address: One Yennu road
    • Phone: +1 555 800 5555
    • Email: sales@yennu.com
  2. Add as much data as you like. Repeat the same steps with the Incidents list by clicking on the gear icon and selecting the list from Site contents.
  3. For Customer Name, you will see data loaded from the Clients list, and the Priority column will let you choose from the previously defined elements:
    • Incident: Failure in the programming of the executive elevator
    • Customer Name: Yennu Enterprises (link)
    • Date: 11/17/2020
    • Priority: High
    • Comments: The elevator returns itself to the last floor when idle.
  4. Again, add as much data as you want. And now, we are moving forward to the next section, where we will build an app from this data structure.
Previous PageNext Page
You have been reading a chapter from
Microsoft Power Apps Cookbook, 2e - Second Edition
Published in: Aug 2022Publisher: PacktISBN-13: 9781803238029
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Author (1)

author image
Eickhel Mendoza

Eickhel Mendoza is a Microsoft Business Applications MVP with many years of experience in project management, Microsoft Azure development, and Microsoft Power Platform technologies. He is a team lead of the Business Apps department and oversees all Microsoft 365 and Power Platform projects. He has contributed to significant community events such as the Power Platform World Tour, Global Azure Bootcamp, Microsoft 365 Developer Bootcamp, and Dynamics 365 Saturdays. He coordinates the TenerifeDev and Power Platform Canarias user groups with a group of like-minded developers eager to share their knowledge in different technologies. Eickhel is also a member of the organizing committee of the Business Applications Summit Spain.
Read more about Eickhel Mendoza