Creating Business Applications with Office 365: Techniques in SharePoint, PowerApps, Power BI, and More
()
About this ebook
Take your Office 365 and SharePoint projects to a higher level by using PowerApps, Flow, Power BI, JavaScript/jQuery jQuery UI widgets, Cascading Style Sheets (CSS), and more. This book will help you create easier solutions to client-side problems and applications. Additionally, you will be able to effectively visualize your data with Power BI.
This book starts with configuration of SharePoint and Office 365 followed by your first example of PowerApps. You will lay the foundation for a help ticket application and see how to update a SharePoint list with PowerApps. You then will work with the jQuery open source library and learn how to use the developer tools within your browser. This allows you to customize data displays in SharePoint.
Next, you will add jQuery UI widgets such as buttons and dialogs to SharePoint, learning how to configure and manipulate them via JavaScript. You will use these new skills to convert a normal SharePoint announcement into a visually compelling page of network alerts. You also will use JavaScript and styles to hugely improve native SharePoint calendars by color-coding them by category or location. To prevent overlapping events in calendars, you will work with SharePoint's web services and JavaScript. You will use similar concepts to make appealing accordion SharePoint pages.
You then will explore Microsoft Forms, Flow, and Power BI, including building surveys in both Forms and SharePoint and using Power BI to show results over the last week, month, quarter, and year. Using advanced Power BI you will see how to deal with JSON, XML, and Yes/No data. Next, you will look at how to display Office documents as well as interact with them via JavaScript.
Switching back to PowerApps, you will build the final help ticketing system before using Power BI to see how to visualize the ticket information. After a quick detour on using iFrames in SharePoint, you will jump into building a power routing application using InfoPath and SharePoint Designer. You will even call SharePoint’s web services from Designer to customize email notifications. You end the InfoPath set of chapters with a highly useful application for signing up for and managing attendance for training and other classes. Finally, you will add Google Analytics to track SharePoint usage.
What You Will Learn
- Build powerful applications with PowerApps
- Extend SharePoint’s capabilities using JavaScript
- Create surveys with SharePoint and Microsoft Forms, copy the results to SharePoint using Flow, and visualize the data with Power BI
- Employ advanced Power BI techniques to include custom columns, pivoting, and dealing with JSON, XML, and Yes/No data
- Use InfoPath and SharePoint workflows to create routing systems, schedule classes, and other advanced tasks
Who This Book Is For
Business and application developers
Related to Creating Business Applications with Office 365
Related ebooks
Building the Modern Workplace with SharePoint Online: Solutions with SPFx, Power Automate, Power Apps, Teams, and PVA Rating: 0 out of 5 stars0 ratingsPower Query for Power BI and Excel Rating: 0 out of 5 stars0 ratingsBeginning Microsoft Power BI: A Practical Guide to Self-Service Data Analytics Rating: 0 out of 5 stars0 ratingsBeginning Power Apps: The Non-Developer's Guide to Building Business Applications Rating: 0 out of 5 stars0 ratingsExpert T-SQL Window Functions in SQL Server 2019: The Hidden Secret to Fast Analytic and Reporting Queries Rating: 0 out of 5 stars0 ratingsVisual Studio Condensed: For Visual Studio 2013 Express, Professional, Premium and Ultimate Editions Rating: 0 out of 5 stars0 ratingsPower Outlook: Unleash the Power of Outlook 2003 Rating: 0 out of 5 stars0 ratingsAdvanced Analytics in Power BI with R and Python: Ingesting, Transforming, Visualizing Rating: 0 out of 5 stars0 ratingsPower BI for the Excel Analyst: Your Essential Guide to Power BI Rating: 0 out of 5 stars0 ratingsBeginning DAX with Power BI: The SQL Pro’s Guide to Better Business Intelligence Rating: 0 out of 5 stars0 ratingsAdvanced Excel Essentials Rating: 2 out of 5 stars2/5Pro Microsoft Power Platform: Solution Building for the Citizen Developer Rating: 0 out of 5 stars0 ratingsPro Power BI Architecture: Sharing, Security, and Deployment Options for Microsoft Power BI Solutions Rating: 0 out of 5 stars0 ratingsProfessional Microsoft SQL Server 2016 Reporting Services and Mobile Reports Rating: 0 out of 5 stars0 ratingsMicrosoft Power BI A Complete Guide - 2019 Edition Rating: 5 out of 5 stars5/5Azure Data Factory by Example: Practical Implementation for Data Engineers Rating: 0 out of 5 stars0 ratingsSharePoint Designer Tutorial: Working with SharePoint Websites Rating: 1 out of 5 stars1/5Expert Cube Development with Microsoft SQL Server 2008 Analysis Services Rating: 5 out of 5 stars5/5Automating Access Databases with Macros Rating: 5 out of 5 stars5/5SharePoint Online Modern Experience Practical Guide: Learn step by step how to use SharePoint Online Modern Experience Rating: 0 out of 5 stars0 ratingsMicrosoft SharePoint Technologies: Planning, Design and Implementation Rating: 0 out of 5 stars0 ratingsMicrosoft SharePoint A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsUnderstanding Azure Data Factory: Operationalizing Big Data and Advanced Analytics Solutions Rating: 0 out of 5 stars0 ratingsPro Power BI Desktop: Self-Service Analytics and Data Visualization for the Power User Rating: 0 out of 5 stars0 ratingsPowerShell for SQL Server Essentials Rating: 0 out of 5 stars0 ratingsSQL Server 2016 Reporting Services Cookbook Rating: 5 out of 5 stars5/5Microsoft SharePoint 2010 Working with Lists Rating: 4 out of 5 stars4/5Data architect A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsGetting Started with SQL Server 2014 Administration Rating: 0 out of 5 stars0 ratings
Programming For You
Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5Web Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Python QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsJava for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratingsPython Data Structures and Algorithms Rating: 5 out of 5 stars5/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Poirot's Early Cases Rating: 5 out of 5 stars5/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Raspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsThe Little SAS Book: A Primer, Sixth Edition Rating: 5 out of 5 stars5/5Python GUI Programming Cookbook - Second Edition Rating: 5 out of 5 stars5/5
Reviews for Creating Business Applications with Office 365
0 ratings0 reviews
Book preview
Creating Business Applications with Office 365 - Jeffrey M. Rhodes
© Jeffrey M. Rhodes 2019
J. M. RhodesCreating Business Applications with Office 365https://doi.org/10.1007/978-1-4842-5331-1_1
1. Enabling SharePoint Designer and Custom Scripting
Jeffrey M. Rhodes¹
(1)
Colorado, CO, USA
Many of the SharePoint solutions to follow involve either connecting with SharePoint Designer or injecting custom JavaScript, Hypertext Markup Language (HTML), and/or Cascading Style Sheets (CSS) content into a SharePoint page. Both of these are disabled by default in Office 365. Fortunately, the same solution described in the following fixes both issues.
For injecting JavaScript, HTML, and/or CSS, I typically insert a Content Editor web part. However, Office 365 modern
pages are missing both the Content Editor and Script Editor as shown in Figure 3.
Figure 3
Missing Content Editor in Office 365
If you have administrator rights, you can follow the steps listed next to add the Content Editor back. If not, you can pass this along to an administrator. If you are using an older version of SharePoint, the Content Editor will already be there.
../images/484672_1_En_1_Chapter/484672_1_En_1_Fig2_HTML.jpgFigure 4
Office 365 dashboard showing the Admin button
1.
Go to the Office 365 dashboard and select Admin as shown in Figure 4.
2.
Select the SharePoint admin center.
3.
Select settings.
4.
Finally, choose the options Allow users to run custom script on personal sites as well as Allow users to run custom script on self-service created sites. Notice the warning that changes might take up to 24 hours. All of these options are shown in Figure 5.
../images/484672_1_En_1_Chapter/484672_1_En_1_Fig3_HTML.jpgFigure 5
Opening the SharePoint admin center and allowing users to run custom scripts
Once Office 365 has updated the settings, Figure 6 shows that the Content Editor is now available.
../images/484672_1_En_1_Chapter/484672_1_En_1_Fig4_HTML.jpgFigure 6
Content Editor available after updating SharePoint settings
© Jeffrey M. Rhodes 2019
J. M. RhodesCreating Business Applications with Office 365https://doi.org/10.1007/978-1-4842-5331-1_2
2. Updating a SharePoint List Using PowerApps
Jeffrey M. Rhodes¹
(1)
Colorado, CO, USA
The original version of this chapter was revised. A correction to this chapter is available at https://doi.org/10.1007/978-1-4842-5331-1_24
PowerApps¹ is a powerful new form tool in Office 365. It is not a direct replacement of InfoPath (which we also use in this book) as it does things differently (and often better). I particularly like that PowerApps can be created completely in the browser, are optimized for mobile devices, can connect to a multitude of data sources, and have a familiar Visual Basic-like syntax.²
In this chapter, we will build a simple application to view and update a SharePoint list. Our overall objective is to create a help ticketing system with these requirements:
Users will fill out a form when they arrive in person at the help desk. It will only include information that they know such as issue, description, who they are, and their department.
Technicians see new items by default but can search for existing items. They can set additional information such as the status, issue category, assigned technician, and notes. Technicians can also add items for situations like phone and email support.
We will build the data source (SharePoint list), make relatively minor changes to the default form, and then create another form to add to or update the list. We will then continue the development in Chapter 15.
Figure 7 shows our SharePoint list along with the default form. Notice that clicking the Customize with PowerApps link launches PowerApps.
../images/484672_1_En_2_Chapter/484672_1_En_2_Fig1_HTML.jpgFigure 7
Help Tickets SharePoint list with corresponding SharePoint form. Clicking Customize with PowerApps launches PowerApps
Customizing the form won’t meet all our requirements only a single form can be launched when the user clicks New (we want separate forms for users and technicians). Plus, we don’t want to have to go to the SharePoint site at all. We want to make all edits via PowerApps. The SharePoint site will instead mainly be a Power BI data source for visualizations showing our ticket information.³
There is still some value in customizing the form as it gives us nice new capabilities and helps us learn PowerApps. One of the first things you will notice in our customized form is that the Description is now only a single line. Figure 8 shows how we drag the Height to give more space and then set the Mode property to be TextMode.MultiLine. While we were at it, we set the HintText property to give the user more instructions on what to do.
../images/484672_1_En_2_Chapter/484672_1_En_2_Fig2_HTML.jpgFigure 8
Updating the Height, HintText, and Mode properties of the Description input
Figure 9 shows the resulting form in SharePoint.
../images/484672_1_En_2_Chapter/484672_1_En_2_Fig3_HTML.pngFigure 9
New Item form customized with PowerApps
More powerful in our case will be to use PowerApps to create a mobile-friendly application for adding, deleting, and editing items as well as searching. To do that, we launch PowerApps directly from our Office 365 home screen. We then choose the Start from data Canvas app. This default to the phone size (the other choice we can do from a blank app is tablet). From there, we select SharePoint as our data source. We enter in the URL for our site (just include the site and not the list). Figure 10 shows the result. Notice how PowerApps created the screens for browsing the data, viewing the details, and editing the data. We update the App name and Description properties and then set the application to Confirm exit and then set a corresponding message.
../images/484672_1_En_2_Chapter/484672_1_En_2_Fig4_HTML.jpgFigure 10
PowerApps application with Browse, Details, and Edit screens
We could do extensive edits as needed within PowerApps, but we will save this for a more customized solution in Chapter 15. For now, we will save⁴ and then share it with other users. Figure 11 shows the resulting New Item screen. Notice that we could access this with the PowerApps mobile application as well.
../images/484672_1_En_2_Chapter/484672_1_En_2_Fig5_HTML.pngFigure 11
New Item screen for Help Tickets list
Footnotes
1
I found Shane Young of BoldZebras’ YouTube channel helpful for learning about PowerApps: www.youtube.com/channel/UC7_OGRP8BYvtGB8eZdPG6Ng.
2
For example, by using the & to concatenate values. I’m a big Visual Basic fan and actually wrote a previous book called VBTrain.Net: Creating Computer and Web Based Training with Visual Basic .NET.
3
We will dig deep into Power BI in later chapters. Another use of SharePoint would be to have a New Tickets
view that could be sorted by date and time. Technicians could use to determine who has been waiting longest and call that person next. We hope to build this into the PowerApps technician application as well.
4
Be sure to save immediately as automatic saving does not kick in until you save the application the first time.
© Jeffrey M. Rhodes 2019
J. M. RhodesCreating Business Applications with Office 365https://doi.org/10.1007/978-1-4842-5331-1_3
3. Customizing Date Displays with jQuery
Jeffrey M. Rhodes¹
(1)
Colorado, CO, USA
The original version of this chapter was revised. A correction to this chapter is available at https://doi.org/10.1007/978-1-4842-5331-1_24
One of richest opportunities for customizing SharePoint functionality is by using JavaScript and, in particular, the popular open source library, jQuery.¹ At the Air Force Academy, we added it as well as the jQuery UI² set of controls to our master pages, making the libraries available on every page in our environment. I won’t do that with these Office 365 examples, but it is fairly easy to link to them directly.
In this example, the customer asked for dates in a Task List to show up in amber when the Due to Director or Overall Suspense dates are within 7 days of the current date. The dates need to be in red once those dates have passed. As shown in Figure 12, the Due to Director already shows up in red since that functionality is built in for the Due Date column only. But we need jQuery to help us with the rest.
../images/484672_1_En_3_Chapter/484672_1_En_3_Fig1_HTML.jpgFigure 12
Task List before customization
The general approach will be to properly format the date display, look at the generated HTML, use jQuery to select that element,³ and then modify it.
Format the Date Display
The first step is to eliminate the friendly
date format that eliminates the year as well as uses description like today
and yesterday.
Instead, we want the Standard format of mm/dd/yyyy. We do this by editing the column settings as shown in Figure 13. This will allow us to compare these dates in our JavaScript.
Figure 13
Standard Display Format for date columns for manipulation via JavaScript
Find the Information in the HTML
The next step is to use the Developer Tools in your browser to inspect the generated HTML in order to figure out a strategy for finding the dates that we want. Figure 14 shows the Developer Tools in Microsoft Edge. We use the DOM⁴ Explorer and select one of the items we want. Microsoft didn’t make it easy for us in this case, since the span doesn’t have an id or a unique class. Moving up a level to the table cell (td) has more promise. It has a combination of classes (ms-cellstyle and ms-vb2). Plus, we need the 8th and 9th