Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft Power Apps Cookbook, 2e

You're reading from   Microsoft Power Apps Cookbook, 2e Apply low-code recipes to solve everyday business challenges and become a Power Apps pro

Arrow left icon
Product type Paperback
Published in Aug 2022
Publisher Packt
ISBN-13 9781803238029
Length 414 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Eickhel Mendoza Eickhel Mendoza
Author Profile Icon Eickhel Mendoza
Eickhel Mendoza
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Building Pixel-Perfect Solutions with Canvas Apps 2. Building from Data with Model-Driven Apps FREE CHAPTER 3. Choosing the Right Data Source for Your Applications 4. Automating Processes with Power Automate 5. Extending the Platform 6. Improving User Experience 7. Power Apps Everywhere 8. Empowering Your Applications with No Code Artificial Intelligence 9. Discovering the Power Platform Admin Center 10. Tips, Tricks, and Troubleshooting 11. Advanced Techniques with Power Apps Component Framework 12. Reaching Beyond the Organization with Power Pages 13. Other Books You May Enjoy
14. Index

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.
lock icon The rest of the chapter is locked
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.
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 $19.99/month. Cancel anytime
Banner background image