Timlin’s focus is on helping customers with their digital transformation journey. Although we have worked with clients in several industries, our work in the Construction industry has illustrated some notable opportunities to transform business operations using the tools in the Office 365 platform.
The Construction Lag
The construction industry currently lags other industries in the implementation of technology. Technology advancements could boost productivity and operational efficiency through more effective communications, collaboration, business process automation, business analytics, and project management. Employees could be more empowered, optimize operations, and identify and address inefficiency.
It’s time for construction organizations to embrace technology, else they may find their peers gaining a competitive advantage. Consider that there are over 273,000 open jobs in the construction industry. Also, consider the average age of a construction employee is 43, and one-fifth of the workforce is over 55.
As companies replace their workforce with younger staff, they are going to find employees with expectations of higher-level digital tools and capabilities.
Opportunities to Achieve Digital Transformation in the Construction Industry
In our experience, we’ve found several areas where the tools in Office 365 can transform construction Operations:
In our experience, we’ve found several areas where the tools in Office 365 can transform construction Operations:
1.) Enable employees to access critical job-related information, regardless of location or device
Bandwidth can be an issue at construction sites, but a well thought out approach allows on-site and remote employees to access to information they need quickly and easily on a phone or tablet. This information typically includes from CAD files, design specifications, contract information, and project plans and schedules. The mobile applications available for Teams, SharePoint, or OneDrive all provide access to all the documents you may need to get the job done.
2.) Optimize – and even automate – business processes
Job delays are problematic and all too common in the industry. One of the biggest ways technology can transform operations is time savings from optimizing – and even automating – business processes. Employees in offices and in the field can move from manual processes, often using paper, to more effective document management, sharing, and security.
Such efficiencies can extend to supporting departments as well. HR can automate vacation tracking, employee reviews, or expense management. Legal can more effectively organize and secure documentation for faster claims response. And that’s just a start. All of this automation can be provided through the implementation of Microsoft Flow workflows and PowerApps forms, and they are available to the desktop, tablet or phone users.
3.) Improve internal communications
With a large number of remote workers, it is critical to bring the team together, communicate key news, and reinforce your company culture. As you move to a younger workforce, this type of communication is going to be assumed.
A SharePoint intranet makes it easy to access and share information and documents, regardless of where employees reside. It does not have to be too elaborate but it should be kept up to date with effective communication. The result is an improved sense of community that allows you to enforce your brand and culture through electronic communications.
4.) Enable efficient and secure project management and collaboration
Microsoft Project Online and Teams are tools to enable efficient project management and collaboration. These tools allow your internal and contract resources to work together, and your IP is protected through proper security measures. The structured nature of Project Online also allows you to more effectively resource your projects, track your variances, and get projects done on time.
5.) Increase and improve business analytics to make better, data-driven decisions
Power BI is a powerful reporting tool that can be used to build dashboards that present the KPIs you need to track and act on to improve operations. Dashboards that present your gross revenue, profit, and other project financials in real-time ensure you act on these metrics quickly and are not surprised by actual results.
6.) Eliminate time-wasting activities
Construction operations produce a lot of documentation. And, as mentioned, it’s often paper-based documents. With highly-organized document repositories, employees can access a document based on its content classification, if it’s specific to a project, architecture, engineering, supply chain, vendor, or another category. With proper content classification, you can set up powerful search capabilities that eliminate wasting time looking for documents.
Timlin has successfully implemented the tools in Microsoft Office 365 for several construction companies. For example, read our case study about we helped The Middlesex Corporation achieve digital transformation with Office 365.
And contact us if you’d like to have a quick conversation to see how we can help you as well.
How Substring Works in Microsoft Flow
In most programming languages, we have access to an extremely helpful function called substring. We can use this function to extract snippets of a string that we need the most. Microsoft Flow is no different in the fact that it offers us the use of this function, but the way we use it is a bit different than typical modern approaches.
How Does Substring Work in Microsoft Flow?
In a programming language like JavaScript, we can use the substring functionality in various ways. Microsoft Flow, however, has one way of using it. When entering the substring expression into a Flow, you will see the inputs required to complete the function (shown below).
This looks relatively standard, but the one part of this that might throw you off is the length parameter. In normal conditions, the length of the string would simply be exactly that, the length of the entire string you are trying to pull a substring out of. However, in this case, if we wanted to subtract a file extension from the name of a file, it would not work.
Let’s take MyWordDocument.docx as an example.
We want to extract “docx” from the string. Typically, we could use the string as the “text” parameter (which would be MyWordDocument.docx), start index would be the index in which the period is, and length would be the entire length of the string. If we do this, we will encounter an error saying that the length parameter we used cannot be longer than the length of the string itself.
There’s a reason this happens — the length is assumed from the starting index. If we had a starting index of 5 and the length of the string was 8, we would come out with a length of 13 instead of the original length of 8, resulting in the error.
How to Use Substring without Error
In order to remedy this problem, we need to do a couple of extra steps. Let’s initialize four parameters in our Microsoft Flow: FileExtension, IndexOfPeriod, LengthOfString, and NewLength as shown below.
First, we will get the index of the period in the string using the following expression:
indexOf(“MyWordDocument.docx”,‘.’)
We can store this in the “IndexOfPeriod” variable by using the “Set Variable” command in Flow. Next, we can store the entire length of the string in our “LengthOfString” variable using the following expression:
length(“MyWordDocument.docx”)
Now, in order to get the actual length, we are going to put into the substring function, we need to subtract the full length of the string from the index in which the period sits. We can store this in the “NewLength” variable and process this using the following expression:
sub(variables(‘LengthOfString’),variables(‘IndexOfPeriod’))
Finally, we can use the substring function to store the final output (which should just be “docx”) in our “FileExtension” variable using the following expression:
substring(“MyWordDocument.docx”,variables(‘IndexOfPeriod’),variables(‘NewLength’))
With that, we should now see that the FileExtension variable now stores the output “docx”, which is exactly what we were looking for. Below is a screenshot of how the Set Variable commands look within Microsoft Flow.
If you have any questions about Microsoft Flow, please reach out to our team here!
Read Next: Thrive’s Shift from SharePoint Designer to Flow & PowerApps
Timlin’s Shift from SharePoint Designer to Flow & PowerAppsSharePoint Designer has been a go-to tool for SharePoint admins and developers for over a decade. And it has been a great tool, in the right hands of an accomplished developer. When combined with the powerful forms capabilities in InfoPath, it proved to be a powerful tool to automate business processes but did require extensive expertise.
However, with the move to the cloud, Designer-based solutions have struggled.
Not only do Flow and PowerApps dominate the headlines, but they also enjoy nearly all of Microsoft’s R&D dollars for no/low-code solutions in Office 365. SharePoint Designer has been stagnant with no new releases since the 2013 version. Mainstream support for the product ends on 7/13/2021. It is actually quite surprising that the tool is still used as much as it is.
There also have been recent advisories where Designer solutions could not be opened or edited for several days. And I have personally witnessed Designer blow away an entire section of a workflow when the desktop application suddenly crashed. Unfortunately, the version restoration capabilities available for Designer solutions running in on-prem environments does not work for SharePoint Online.
As risk continues to increase for Designer-based solutions, advancements in Flow and PowerApps make these the new, go-to tools for new solution creation at Timlin.
We have recently engaged with a number of customers with complicated SharePoint designer based solutions where we have rebuilt those solutions using the Flow and PowerApps tools. With the recent innovations in Flow and PowerApps, the time is right to look closely at retiring SharePoint designer based solutions. Thus, we recommend performing an inventory of your SharePoint environment and noting all Designer solutions and develop a rebuild strategy.
If you have any questions or need assistance, you can reach out to our team here and we will happily give guidance on performing a SharePoint inventory.
How To Avoid Chaos By Following An Office 365 Governance PlanOffice 365 has over 30 different applications. While you may not use all of them, failure to implement some level of governance for your critical and frequently used applications and lead to chaos — and a lot of trouble to unwind down the road. The following are just some of the pain points that are likely to arise when you don’t follow a governance plan:
- Symptom 1: Users can’t find information, use outdated materials, and don’t know where to put company documentation and materials.
- Symptom 2: You can’t get anyone to use the tools, or you don’t know what they’re using
- Symptom 3: You stumble on data that is being shared with unknown outside accounts
- Symptom 4: You get a lot of phishing emails, and are very concerned about private data escaping
- Symptom 5: When the IT person who managed your Intranet left the company, everything just stopped getting used
- Symptom 6: You don’t know what these tools are good for within your organization
- Symptom 7: The features are always changing and you’re not sure when and how to stay on top of it
- Symptom 8: You struggle with Shadow IT
Have you encountered any of the above issues?
These problems arise when you have organic growth and use. Content, data collections, teams, sites, folders, permissions, etc. are created, used, and shared at the discretion of most or all end users. Little to no information architecture has been completed. Business users lack awareness in the capabilities, so they only use a small fraction of the features or none at all. There’s a strong need for alignment.
Establishing and executing a governance strategy enables organizations to:
- Understand and close the gap on corporate policies relative to the technology available that can break or help follow those policies
- Align the configuring and security of the technology and tools to align with corporate policies
- Provide guidance to the organization regarding how these tools can help solve real-world business problems in an IT-supported manner
- Bring a group of people together to help define and follow objectives that marry the technology to the needs of the business
- Define specific training opportunities and requirements
- Understand the type of internal support needed for these tools
- Maintain a process to continuous improvement by meeting regularly to discuss how to adjust to the changing needs of the business along with the changing capabilities of the tools that serve it.
- Remove IT as a single point of failure and single “owner” of the technology.
What do you ACTUALLY need to Govern?
Not everything needs governance, some tools are pretty specific and relatively independent. It certainly depends on how your organization runs culturally, but the following are the common tools and applications that are often cross-used enough to require governance:
- Microsoft Teams
- Intranet (not an application, but common use of the tools)
- SharePoint
- Planner
- OneDrive
- OneNote
It’s important to keep in mind that one of the main goals of governance is to drive user adoption, predictable usage, and trust in the IT department to serve the business. These factors will drastically help cut down on Shadow IT and the unsanctioned and unsupported use of external tools and sharing of organizational IP.
Microsoft Teams
Teams is new on the scene but is being adopted faster than any other new Microsoft product I’ve ever seen. This is good and bad news for those of us trying to help ensure proper long-term use of such applications. The tendency for early sprawl is very high, and without a history of experience to rely on, it makes proactive governance more difficult for this type of application.
However, there are governance plans that will help with Teams. The process is generally the same as the other tools or applications, but you need to understand what Teams is capable of offering so that you can understand what questions to ask to ensure proper guidance.
Teams governance should conclude with an understanding of how you agree your organization will start using Teams, but not necessarily how they will be using it down the road. You want to understand configuration, naming conventions, permissions, content, lifecycles, sharing, training, support, guidance, and administration. You also want to know which folks on your team(s) will be responsible for helping to support this plan tactically.
Intranet
Your intranet is your place to disseminate important company information in an organized and “findable” manner. It makes sense to understand the needs of different departments, ensure they have the training and understanding to follow the process, and the diligence to follow-through on the plan. Having an agreement and guidance on the type and location of content from multiple stakeholders, and plan to ensure the intranet does not become stale is critical to its long-term success.
Intranets tend to be a cultural phenomenon as opposed to a technical masterpiece. User Adoption is the primary goal of this type of application. Keep that in mind as you envision your organization’s needs over time. The best intranets are the ones where people need to use them to find information. If you don’t really need one, consider using Microsoft Teams as a quasi-Intranet instead. Any movement away from using Email as storage mechanism for corporate knowledge and data is a good thing.
SharePoint
SharePoint has had a bad rap over the years because it’s essentially just a platform and set of services. It doesn’t solve a whole bunch of problems by itself. It’s not the dining room table and chairs, it’s a pile of lumber and set of nice power tools. Most people hammer together a couple of 2x4s and then say “SharePoint sucks”, I should have just bought a table and chairs. Having worked on this platform for over 12 years, I completely understand. I will offer the counter-point with a Governance spin:
The beauty of SharePoint is that the pile of lumber and tools can make almost anything, but we need to think about what we really need, can build, use, and support. It’s generally our own fault when our SharePoint implementation fails. The key is to understand what clearly identified and agreed upon problem is being solved, before planning the build out, use, and support for it.
Governance forces us to ask for what we intend to use technology, and how we plan to use and maintain it. If we want to use SharePoint for project management, we would create a strategy for naming conventions, permissions, templates, data contained within these sites, their lifecycle and archival plan, ownership, and more. Most importantly, the governance team would agree to monitor, adjust, and enforce decisions that drive the guided user adoption as intended.
Planner / OneDrive / OneNote
I bundle these three together not because they don’t deserve their own attention, but because of the somewhat more fluid and individual nature of their use. Planner could definitely have a more guided strategy if teams have expectations around how a board is built and used, but there is a lot of freedom in these particular applications.
Governance around these tools is generally kept at the policy, security, sharing, and training level because restricting how someone takes notes is not the control we want to achieve. However, guidance for the type of data stored in OneDrive versus a Team or SharePoint site makes a lot of sense. Knowing that a OneDrive repository will eventually be deleted after an employee departs means that data stored there needs to be user-based, not team-owned.
OneNote can be used as an agreed upon source for certain collaboration tasks within Teams and Sites, with a predictable format of naming conventions for notebooks, sections, and pages, but also allowing for the individual/personal use of these tools in whatever manner suits the employees.
Each application has some elements that can and should be governed while opening up the other aspects for freedom of use. The key is awareness and training to help business users understand what the tools can do for them.
Build It And They Will Come
Governance does not have to be a multi-month, drawn-out project. In these cases, most organizations will abandon the effort before the go-live date.
Instead, Governance should involve some initial up-front effort, and then a small and consistent (habit-forming) commitment to making minor modifications moving forward. Just like anything else, once the system is built for ongoing success and is well understood, the torch can be passed to other folks on the team to continue the process.
Start small, don’t worry too much about backing yourselves into a corner. Meeting on a regular basis with your governance committee and other stakeholders to discuss the usage and guidance will allow you to make course corrections based on critical feedback from your user base.
Instead of building something without the user in mind, a governance plan allows the process to be intentional and deliberate, as it reinforces to those users that you are there for long-haul to continue the digital transformation journey.
How To Create Image Renditions and Dynamic Content in SharePoint
What Are SharePoint Image Renditions?
Image Renditions in SharePoint allow for users to dynamically generate different resolution outputs of images stored within SharePoint. This option is available in a SharePoint site collection if you have publishing enabled.
Typically, Image Renditions are utilized by creating pre-defined width and height renditions so you can then call in a URL parameter to get that output template for an image of your choosing.
However, there is a way in SharePoint Online that will allow you to dynamically set these parameters on the fly, giving you the freedom to theoretically create custom image galleries or customized image content in general.
Creating the Renditions
Let’s say for example we have a document library in SharePoint Online that is comprised of only images. You can use the SharePoint REST API to pull back all of the items we have in that library. From there, you can use predefined styles from Microsoft (using their ms-grid system and singleCard elements) in a SharePoint Framework web part to start building a custom image gallery.
In typical scenarios, you can either pull back the entire file or the small thumbnail version of an image. This can cause several issues:
- The thumbnail version of the photo will come across extremely small and will be blown up to a large size in the card element leaving it blurry.
- The full version of the file will cause performance issues based on how large the file is and how many the web part might need to load.
However, we can pull back the full file and optimize it to a more manageable size.
Let’s say you have a very large image (2-3k resolution or higher) and you need to generate a thumbnail for it that is not blurry. In this instance, we can actually resolve the full name of the file (https://contoso.sharepoint.com/sites/Timlin/ImageLibrary/FilePath) and append the follow parameters to the end: ?Width=400&Height=200.
This leaves you with a full example URL of: https://contoso.sharepoint.com/sites/Timlin/ImageLibrary/FilePath?Width=400&Height=200.
In the background, each one of the images we pull back and append those parameters to, will be optimized and scaled for the defined width and height. This cuts down on loading time and allows you to generate easily readable thumbnail content for these files.
Handlebars Example Code for Single Card Output
To start, what do I mean by ‘Linked and Unlinked PowerApps for SharePoint’? In short, you can create a PowerApp for a SharePoint list directly from the list itself (as shown below). When doing so, the PowerApp is directly linked with that list and is ready to go for submitting items.
The other way of creating a PowerApp that will handle data submission to your SharePoint list is by creating a blank PowerApp and adding the list as a data source via a Form element.
Each of these approaches has their pros and cons, and we are going to go over these differences, so you can determine which solution works best for whatever it is you are trying to do with PowerApps and SharePoint.
Linked PowerApps
A linked PowerApp will be the easiest and most user-friendly way of creating a PowerApp that is directly associated with a SharePoint list in your environment.
It will, by default, contain all fields that are currently present in the SharePoint list from which it was made. These fields can be removed or hidden at will, but any required fields will need to remain on the PowerApp and its respective form.
One con to this approach is the fact that you are now restricted to using a Phone Layout and only a Phone Layout. There is no out-of-the-box way (currently) to directly create a larger PowerApp (tablet layout) that will be associated with a SharePoint list. You will still have the ability to customize your application in the Phone Layout just as you could customize any other PowerApp, but you will be limited to the phone resolution and aspect ratio. Attempting to increase the application size in app settings will only increase the container, not the content within the application itself.
Unlinked PowerApps
The unlinked approach is a more technical approach to creating a PowerApp for a SharePoint list. This involves creating a blank Phone or Tablet layout PowerApp and adding the list as a Data Source. The easiest and quickest way to do this is to add a “Form” element and set its data source to the list you are attempting to work with.
This approach will grant you the ability to make larger PowerApps that will still post data to your SharePoint list. The main concern here is not being able to create new entries in the SharePoint list, but to edit entries that have already been created.
In a linked PowerApp, the list item will already be fed into your PowerApp and be ready to edit. In an unlinked PowerApp you will need to configure custom parameters that pull in the item that is being selected.
This definitely adds a level of complexity to the form/PowerApp, but depending on how large of an application you are looking to develop, this may still be your best approach.
Interested in this solution for your SharePoint investment and working with the Timlin team? Request a 30-minute free consultation here.
Learning a new technology in itself can be difficult. Add on all of the daily work you and your employees have to do and the quarterly goals you have to hit, and it can be quite the headache to bring in new processes. Even though you know a new technology can speed up productivity, the unknown aspects of adopting it are reason enough to deter you from trying. It’s why you keep doing things the way you’ve always done them.
Organizations try to help by investing in training when adopting a new technology tool, but it’s usually a one size fits all approach. For example, they will hire a trainer, and teams will take courses over the span of several weeks to learn how to use Office 365 tools. But at the end of the training, employees are just scratching the surface of the new tools. With all the resources available, why are they not adopting the new technology?
First, tools like Office 365 are constantly evolving. Second, teams don’t invest in training that offers tailored training, support, and guidance that’s applicable to their departments and day-to-day responsibilities.
At Timlin Enterprises, we believe contextual training is the key to unlock the technology adoption door. Let’s unpack how our approach is encouraging users to embrace Office 365.
Where There’s a Will There’s a Way
First and foremost, employees need to have a reason to learn something new. For example, I don’t just go to my garage and start woodworking. I learn by building something. This would be something simple at first like a birdhouse to learn the basics until I can advance my skills to build a table. Without a goal, most people don’t have the mental energy to apply the knowledge to something that they will retain. This is the main reason generic training fails. Without a specific problem to solve, the material is forgotten.
Awareness is the First Step to User Adoption
It’s crucial to create awareness of new technology within your organization before beginning a training program. If users don’t even know they can use Office 365 for more than email and document storage, they won’t even think about it, much less attempt to use it.
Start by building awareness and knowledge of the tool and its capabilities in a way that’s relevant to employee skill sets, organizational guidance (governance), and areas with small problems. We use past customer experiences to understand what different organizational roles are most likely to need. We talk to Human Resources about document publishing and maintenance, onboarding workflows, and templates for distributing organizational information.
Offering these small sessions targeted at specific types of users and capabilities starts to generate ideas, initial knowledge, and even excitement about Office 365. This is all part of the plan. As long as people know what is possible, and they have been given a conduit to get help, you’ve given them the key to unlock the door.
Knowledge is Power
With ongoing feature awareness in full swing, start working regularly with the teams and departments to talk about inefficiencies, issues in the process, struggles, and generally trying to uncover small elements of their work that could be simple training opportunities. It’s important to bring employees through the training at a comfortable pace. We’ve found that training and support are often intertwined, with more formal training coming out of needs analysis uncovered from common support trends.
For example, we work with end users to solve small problems, showing them exactly what we did, and how the features work. It’s an opportunity to train, teach, and provide a solution all in one instance—the very essence of contextual training. We also discuss those instances internally to uncover patterns that help us understand additional proactive training opportunities. If we see several people with similar issues, we can help solve for that across a larger audience.
The goal here is really to provide practical knowledge, not theoretical capabilities. New knowledge only sticks when the user has a vested interest in learning, such as when they need a solution to complete an important task.
The Building Blocks of Digital Transformation
Contextual training and user adoption are essential as you work to achieve digital transformation within your organization. It’s a building-block approach to learning. Users can’t absorb too much information all at once. Instead, implement a contextual training program that spans several months, so users can focus on specific training that relates to their specific job and processes.
Empowering users with knowledge of the tools to solve specific problems is what impacts real change. By continually adding to their day-to-day capabilities, employees will use Office 365 more often and will eventually consider it an essential part of how they work.
Compared to pre-built training, videos, books, or intense training classes, a contextual approach really adheres to the principles of digital transformation and true learning. By investing in contextual training, you’ll see user adoption and engagement of Office 365 soar within your organization.
SharePoint Framework – Passing The SharePoint Context Object
The SharePoint context object can give you a lot of crucial information about the user currently logged in, the page that a user is on, templates being used, and more.
By default, when working in SharePoint Framework, by default, you will have access to the context object within the most parent component.
In this case, the component is the BaseClientSideWebPart component. For the most part, we will want to keep each component in our projects clean and, as we don’t have access to state in this component, we will want to pass context down to the next highest child component. This child component will technically become the parent component to every other component in our project as it will handle most of our data operations (this can also be a service if you would like).
Passing the Context Object Down
A very important use case for employing the context object is being able to utilize the spHttpClient that will grant us access to SharePoint’s REST API in the context of the currently logged in user.
The easiest way to do this is to pass the context object as a whole down as a member of props. When creating a project in SharePoint Framework (as a Web Part project), it will generate a main .ts file (the BaseClientSideWebPart) and a single component with the .tsx syntax.
In addition, a Props file for that .tsx file should also be available. We will first want to add a line to our Props file for the context object we will be passing. Simply define “context: any;” in the Props file, and we should be done here (as shown below).
Now that our Web Part has the property available, we can head over into our root .ts file to pass the context object down. To do so, simply define the prop “context: this.context” in the React.createElement statement (as shown below).
Our context object should now be available in our SPFXWebPart. To test this, we can make a simple REST API call to get the current site’s lists. Add the code shown below into the constructor statement of your web part (you may need to add the constructor if you did not already).
The site URL variable can either be defined or replaced with plain text. It can also be removed completely to make a relative call to the site it is deployed on.
If the call comes back with the expected data, you have successfully passed the SharePoint context object down through your web parts in SharePoint Framework.
Interested in this solution for your SharePoint investment and working with the Timlin team? Request a 30-minute free consultation here.
Timlin had the opportunity to create a knowledge management system for a client using SharePoint Online. One of the requirements was to use item level-permissions to control access based on metadata. We used Microsoft Flow to satisfy this requirement and provide the client with a low-maintenance process along with tracking and visibility.
The Setup
To get started, a Document Library entitled Articles was created. The library contained metadata to indicate Visibility, as well as a lookup to a Department’s list. The Department’s list was a list of each of the company’s departments, with an additional Text column to store the AD group associated with that Department.
The rules to be implemented were: If the Visibility is Public, grant everyone access to see the document. If the Visibility is Confidential, only members of the tagged Departments would have access to view the document. In order to prevent any visibility into Confidential documents, the initial permission for all items did not include the Visitors group.
The Flow
To begin, a Flow was created using the “When a file is created or modified (properties only)” trigger, specifying the Articles library as the source Library Name.
Two Integer variables were initialized to hold values needed later.
In order to grant access to Visitors, we need to retrieve the principal for the site group. This is accomplished using the “Send an HTTP request to SharePoint”. This Action allows you to send a fully authenticated request to the SharePoint APIs.
In this case, we use the SiteGroups/GetByName call to get the Visitors group. We then store the value in the variable we stored. Based on the way the JSON data is returned, we want to set the variable to the value in [‘d’][‘id’].
Next, we use the same component to break inheritance using the BreakRoleInheritance POST request on the item, using the ID from the original trigger.
We’ll use the Get Items action to retrieve all the values for the Department’s list. We’ll use this later to ensure we clean up properly.
To get started on setting permissions, we’ll use the Switch control to determine what action to take based on the Visibility column. For Public visibility, we’ll grant access to the Visitors group using the same HTTP Request action from before.
We’ll use the RoleAssignments/AddRoleAssignment method on the item to add the Visitors group we looked up earlier.
Note: to get the RoleDefId for the permission level you want to set, you can use the /_api/web/RoleDefinitions endpoint to retrieve all roles for the site collection. Look for the Name element of the desired Permission Level and find the corresponding Id value. In this case, we use 1073741826 which is associated with the Read permission level.
We have much more work to do for Confidential documents.
First, we want to remove any existing Department Group assignments. We’ll use an Apply To Each action to iterate over the Department’s list we retrieved earlier. We need to get the Principal for that group, similar to how we retrieved the Visitors group, and use the RoleAssignments/RemoveRoleAssignment method to remove any permissions for that group/permission level.
Once removed, we’ll again iterate, this time over the departments associated with the Article. We’ll retrieve the full Department item using the Get Item action, so we can find the corresponding AD Group associated with the Department. We’ll store that value and once again use the RoleAssignments/AddRoleAssignment method to grant Read permission to the item.
Upon execution, any items added or modified will have the appropriate permission level set based on the Visibility and Department values tagged by the author.
How To Create Full-Width SharePoint Modern Pages
Something that you’ll notice with SharePoint Modern pages is that they currently limit you to a restricted with container centered in the page.
The modern experience does have a full-width container on specific pages, but only certain web parts can be added to this area (the Hero and Image webparts). With SharePoint Framework, you can make web parts that are marked as being eligible for the full-width container but that doesn’t help you if you want web parts that already from with the Modern experience.
Making your Modern Pages Full Width
Before we continue, I want to make sure that it is noted that the method detailed in this article is not supported by Microsoft at this time. However, the method used will cause no harm to the environment or your page structure and is merely an easily implementable web part.
To start, create a new SharePoint Framework project using the yeoman generator. If you have not done this before, please refer to the documentation here for instructions on how to do this.
We are going to use this web part globally across the tenant so ensure you give it a name you’ll recognize. The name we will give it for this exercise is “Full Width Web Part”.
Once all of the solution files have completed downloading, open up the solution’s code with “code .” in your command prompt (while in the directory the project was created in). This will open the solution inside of Visual Studio Code. To start, we will need to install the npm package for jQuery.
To do so, type “npm install jquery –save” in your command prompt. This will download and load the package into the dependencies of your project.
From here, we will want to import this dependency into the root BaseClientSideWebPart of our project. Add the line “import $ from ‘jquery’;” after the last default import statement in the file, as shown below.
Next, we merely need to add a single line to the render statement on this same file. Add the line “$(“.CanvasZone”).css(‘max-width’,’100%’);” right before the ReactDom.render statement, as shown below.
At this point, we’ve done all we need to do in the code. Bundle and package the solution for deployment in your SharePoint App Catalog (using gulp bundle –ship and gulp package-solution –ship).
*Note: To use the –ship production pipeline, you will need to have enabled the public CDN for Office 365 in your tenant. If you have not done this or are not sure if it is enabled, review the instructions here.
Once the package is deployed, simply add the “Full-Width Web Part” that we just created and deployed to any modern page that you want to have a full-width container and we are good to go.