A temporary message on top of your SharePoint Page

Audience: site owners, developers

I mentioned in my last post that a CEWP or its modern equivalent still have a place in SharePoint. An example is to display a temporary message, like in special occasions such as Halloween or New Year.

Before we get to the code, let me start with a couple disclaimers.

  1. Code injection can be dangerous, especially scripts. In this example we’ll only be using a few safe lines of styling (CSS) to decorate the page.
  2. There are better options for site-wide customizations, or more permanent needs such as recurring messages
  3. The customization relies on a CEWP for classic sites. On modern you’ll need to install a “modern CEWP“.
  4. I have only tested the code in Chrome and the new Edge.

Steps to our Halloween banner

  1. Get an image, and upload it to a SharePoint library users have read access to. I got mine from Openclipart which allows for unlimited commercial use.
  2. Save the CSS below to a text file and upload it to the SharePoint library, after you replace the image link with your own. You can also adjust the height and background color as needed.
  3. Insert a CEWP or “Modern CEWP” to your page and link it to the text file. Voila!
<style type="text/css">
body::before {
background: url('https://pathto.sharepoint.com/.../pumpkin.svg');
background-color: black;

Here is another example where I used #E34602 as background color:

You can also insert text, using the content property:

  <style type="text/css">
body::before {
 background-color: #E34602;
 content: "Happy Halloween!";

Transitioning from classic Content Editor Web Part to modern

Audience: SharePoint admins, Citizen Developers.

The Content Editor Web Part (CEWP) was a pillar of Power User and Citizen Developer work on classic SharePoint. Countless posts on this blog are dedicated to it and its siblings, the Script Editor Web Part and the Page Viewer Web Part.

With the migration to modern, the CEWP is not available anymore and site owners have been looking for alternatives.

My first advice is to clearly understand what problem you are trying to address, and look at out-of-the-box options. For example, if you need to insert some HTML in the page, maybe the Markdown Web Part has you covered? If you are trying to trigger an action, maybe Power Automate or Power Apps could fit the bill?

There are still situations where there is no easy path forward. What if you just need light adjustments to styles in the page? What if you want a news-like layout, with text wrapped around an image, like in the example below?

Microsoft’s answer is the SharePoint Framework (SPFx). The SPFx allows us to build Client Side Web Parts to complement the out-of-the-box solutions.

Several developers have leveraged the SharePoint Framework (SPFx), to release a modern version of the CEWP. Just to name a couple, check out the spjs blog or the Microsoft 365 PnP community.

I have decided to publish my own version on github. It is the first of a series of Client Side Web Parts I plan to release in the next couple months. Note that it is still in preview (version 0.9), and – like any Client Side Web Part – you’ll need an admin to install it on your environment.

But why yet another solution when there are already several available?

Beyond just offering a patch, I have a plan in mind. You’ll notice that my solution is named “Dangerous Content Web Part“, rather than “modern CEWP”. The first objective is to pass the message, and alert users on the risk when using such a Web Part. The other intent is to start working with clients on a “Safe Content Web Part” to smoothly transition out of the danger zone. If you are interested, contact me!

Walkthrough: download in bulk your favorite resources from MS Ignite

Audience: end users.

Microsoft Ignite has poured on us tons of Microsoft 365 announcements, and thankfully tons of resources to help us get started. Your first step to access those resources is to head to myignite.microsoft.com. There, you can explore the sessions, and for each you’ll get access, in the right hand pane, to a number of resources.

Notice in particular the one that says “Download Resources”. It’s actually the exact same for every session, and lets you download a PowerShell script that in turn will help you download resources.

Great and easy for a techie. For the regular business user, PowerShell can be a little bit intimidating. However, it has become an essential tool in modern Microsoft 365, where some settings get released through PowerShell first, before being surfaced in the admin or setting menus.

So let’s turn this to our advantage, and take this opportunity to get started with PowerShell and at the same time get a copy of our favorite resources.

Disclaimer: this is NOT an invitation to start downloading and running any PowerShell script available from the internet. Scripts can be harmful, especially as they can leverage your credentials. Only use trusted sources and use your own judgment. We are going to trust Microsoft on this specific one.

Click on “Download Resources” to download the zip file, and unzip it. It should look like this in file explorer:

The instructions are in the readme, let me just use an example to walk you through.

  1. First, you need to identify the sessions you are interested in, using their session code located toward the bottom of the page. Let’s pick two of my favorites:
    DB158 (Collaboration announcements)
    DB154 (Project Cortex)
  2. Back in file explorer, where we unzipped, open PowerShell from the file menu

3. You’ll get a blue screen, we’re doing just fine:

Now you can type the PowerShell command and let the script download your resources – just make sure you have room on your computer as these include large videos!

.\Download-Resources.ps1 -directory . -sessionCodes "DB158,DB154"

4. You’ll be presented with a warning, just type R and enter to run once.

5. You can now follow the progress as files get downloaded

6. We’re done! If that was your first PowerShell experience, congratulations!

The MS Ignite Book of News

Looking for the most extensive coverage of Microsoft Ignite? Still hungry for announcements even after reading my previous post and exploring the Power BI reports? (I refreshed mine at noon PST btw)

Microsoft has published the Ignite 2020 Book of News, with the goal to cover all the announcements from the Conference. You’ll wish you hadn’t asked 😉

Thanks to Mark Kashman for bringing this to our attention in his own [always special] way.

MS Ignite: Day One Recap

As expected, Microsoft flooded us with announcements on this first day of the MS Ignite conference. I’ll only cover here my picks, on the collaboration and app building spectrum for desktop. There were a number of improvements on mobile I’ll need to get back to later. For a broader view, for example if you’re more into admin or compliance, I encourage you – just as I did yesterday – to directly browse my Power BI report. I refreshed it at 5pm PST, and won’t change until the refresh for day 2, around noon tomorrow.

I found out that there was another live report available, curated by John White. It offers a different perspective, so you can definitely explore both.

Remember that there are some contests with prizes going on. I already talked about Microsoft Mechanics Sweepstakes yesterday, but my preferred one is the Microsoft Ignite Cloud Skills Challenge which encourages you to learn.

Now to the announcements!

New Power Platform icons: the new look (see above) is more in line with the other products. You can check out the icons for yourself in your own Microsoft 365 waffle.

SharePoint Syntex: part of the broader Project Cortex, this app leverages AI and machine teaching to take on tasks such as document recognition and classification.

Project Oakdale: gives you a Power Platform like experience directly within Microsoft Teams, with the ability to create a table (up to 2 GB of data) and build a Power Apps app on top of it.
A benefit of this low-code approach, compared to a Microsoft list for example, is that it is scalable and can later be enhanced by developers.

Project Nucleus: Microsoft Lists hit back by bringing caching capabilities, promising fast response on large lists (bye bye 5,000 item limit) and the ability to work offline.

SharePoint global navigation: a new vertical bar positioned on the left hand side, similar to the experience you get in Microsoft Teams. You set it up on the Home Site.

SharePoint Framework: it now allows developers to build Microsoft Teams apps, in addition to the already available capabilities to build tabs and personal apps.

Microsoft Stream: videos are becoming first class citizens, benefiting from the same features as other files: external and anonymous sharing, integration with Microsoft Search, enhanced analytics, and new controls for security and compliance.

Microsoft Teams: a bunch of new features, including:

  • Upper limit of 25,000 members per team, instead of 10,000
  • Webinar registration
  • New search experience
  • SharePoint Home site in Teams
  • PowerPoint Presenter Mode
  • integration with github

Some more reading from Microsoft:
A new vision for Microsoft Stream
What’s New in Microsoft Teams | Microsoft Ignite 2020
Microsoft Lists Announcements

And to conclude this post, a selection of tweets with screenshots. Enjoy!

Follow the MS Ignite Action Through Power BI

I have set up a Power BI report that tracks tweets related to the MS Ignite conference (September 22-24, 2020). The idea is that rather than me telling you what’s happening, you can select your own favorite hashtags or authors and see what they are up to. Click on the link in the bottom left to open the tweet on twitter.

I’ll refresh the report a couple times a day. It is based on popularity (retweets and likes), so don’t count on it to report on the last minute news. Also, the Power BI “Publish to Web” feature caches the reports, and it might take an hour between my refresh and the Web update.

Incidentally our most popular tweet at the time of refresh happens to be coming from Microsoft’s CEO, Satya Nadella 🙂 Also highlighted in the “decomposition tree”: Karuana Gatimu, Dona Sarkar and Anna Chu.

Other than that, you might also want to check out the Microsoft Mechanics Sweepstakes 🙂 We’ll need to wait until tomorrow for more technical announcements.

If you compare to my previous post, you’ll also notice a different logo in the top left. Let’s see if this one sticks 🙂

Back to blogging!

It’s been almost 6 years since my last blog post…

There are many reasons for the long silence, let me just expand on one.

The period from 2015 to 2017 marked a shift for Office 365, with the move to modern and an explosion of new apps. We found ourselves in a long transition period, with Office 365 promising a lot but not delivering so much initially. Remember the one-column template for modern SharePoint home pages? Surely, because that was the only option 🙂 Remember the shift of SharePoint calendars from classic to modern? Certainly not, because it never happened (we finally got a modern calendar view a few weeks ago, in Microsoft Lists). Loops in Microsoft Flow? Not an option initially. The list goes on.

From a development and customization perspective, there was also some back and forth (who remembers Client Side Rendering?) which left me wondering where to invest next. A side effect of modern + open source was to kill my SPELL initiative. The modern development tools were very different from traditional JavaScript, with the rise of TypeScript. The PnPjs library did exactly what SPELL did – abstract the 365 REST API – except that it was backed by Microsoft and a very strong community. Sure, SPELL had its own strengths and was especially powerful with older SharePoint versions, but who is still on SP 2010 or 2013 today? (oh! The workflows, sure, but that’s a different story).

Fast forward to 2020. Microsoft 365 has come a long way. It reached maturity 2-3 years ago and has become the ubiquitous platform it was meant to be. The past 3 years have been exciting, although they didn’t give me much time to breathe, even less take a week of vacation. Finally I feel I have caught up on (almost) all fronts. That is, until the new wave of announcements next week at the MS Ignite conference

The bright side for me is that both client side development and the “maker”/”citizen developer”/”fusion dev” paths I was promoting 10 years ago, along with a few folks (yes, Marc Anderson was already a community pillar at the time!), those paths have now gone mainstream, and it has become easier to convince people that they just work 🙂

12 years ago I started this blog to share my SharePoint tricks, such as the “HTML Calculated Column” and the “Easy Tabs”. Today we have new technologies, and I have some new tips that I am ready to share. An upcoming topic will be “Property Pane Portals”, a technique I recently came up with to set up SPFx property panes.

Still on SharePoint 2016 and distant from the 365 buzz? I’d love to hear from you. The SPELL product itself is not relevant anymore on modern cloud, but works on SP 2016. More importantly, now is a good time to bridge the gap between classic and modern before you move to the Cloud. Actually one of my first new posts will be about client side solutions built on SP 2016.

Stay tuned! And as an appetizer, if you haven’t checked it out yet, take a look at the Power BI demo I published to the Microsoft Power BI data stories gallery. I’ll have a similar report ready to track MS Ignite next week!

Proof of Concept: custom layouts for SharePoint forms

One question I get frequently is how to build real world forms with SharePoint. This involves in particular organizing the fields in logical blocks (e.g. Street/City/Zip Code/State) and tweaking the layout to have multiple columns or interactive zones (e.g. tabs).

Until last year, InfoPath was the official go-to application for form design. You can still use it today, however in January 2014 Microsoft announced that InfoPath was retired. Some InfoPath fans will tell you that with Microsoft’s deprecation policy you are still safe for 10 years… What they don’t mention is that this is only true if you decide never to upgrade to new SharePoint versions!

Considering the lack of visibility on the future of SharePoint forms, I have decided to explore what could be done with my SPELL library.

SPELL already includes several building blocks to help with forms, in SP 2007, SP 2010, SP 2013 and Office 365. It can parse a default SharePoint form page, identify field types (e.g. text, drop-down choice, multi-lookup), and add behaviors like cascading selects or pre-populated fields. Also, I already have a solution for form layouts, however just limited to tabs. The new solution will expand it, to allow for more custom layouts.

To accommodate the new features, SPELL is going to evolve:

  • the existing Form module will be renamed Form Behaviors: cascading selects, item ID, pre-populated fields, read only fields, color coding, etc.
  • the new module will be called Form Layout and will include Form Tabs.

To get started, I have built a proof of concept. Feel free to play with it, and let me know what you think! Eventually the plan is to release a gratis and a commercial version, just like I already did with Tabs and Cascading Selects.

A quick walk through:

  1. Move the logo to confirm that your browser supports drag and drop
  2. In the Form Editor, select the target form, the layout and the name of each zone. Then press “Retrieve Form and Render Layout”.
  3. Drag and drop the fields to add them to the custom form layout. Double click on a field name to switch to a stacked display (example: Task Name in the screenshot below).

What if my browser doesn’t support drag and drop?

The proof of concept is not going to work. You’ll need to switch to a browser that supports the HTML5 standard (yes, HTML5 officially became a standard…today!), or add the feature via a polyfill.

Note that:

  • a fix for older browsers will be included in the final solution
  • only the designer – not the regular end user – needs the drag and drop feature.

Tentative release schedule:

  • End of 2014: alpha version, available to existing SPELL users.
  • Early 2015: the SPELL Form Layout will be offered for on premises environments (SP 2007, SP 2010, SP 2013).
  • For new SPELL users on Office 365, I plan to make the solution available in the second half of 2015.