How to move OneNote section tabs and pages to the left (updated June 2023)

Back in 2018, I wrote about the only way to move section tabs to the left at the time and, unfortunately, it meant that you’d have sections on the left AND the top. Now, thanks to continuing development of OneNote, we have a new view setting called Tabs Layout that fixes the issue and moves your notebook, section, and page navigation panels to the left of your OneNote desktop app.

Now it’s simple, and you don’t even have to open the Options menu. Here’s how to move your section tabs and pages to the left:

  1. Select the View ribbon menu
  2. Select Tabs Layout and then
  3. Choose Vertical Tabs or Horizontal Tabs (default).
Tabs Layout options in the OneNote desktop app | Click to enlarge

Here’s a video demonstration of these steps with additional info:

It’s worth noting that if you select Vertical Tabs, your display settings (File | Options | Display) are restricted since it cancels out other options. For example, pages can’t be moved back to the right side.

And, lastly, f you don’t want to move pages to the left or if you ONLY want to move pages to the left, please check out my previous post for instructions on that setting.

How to create one-click, direct download links in modern SharePoint Online libraries

I previously blogged how to create one-click direct download links, but that post was exclusive to the classic experience in SharePoint (or any opportunity in which we could use classic html/css).

Normally, to download a document in modern SharePoint Online libraries, we would have to use a file’s menu (right-click or ellipsis) then choose Download.

Click to enlarge

I was recently challenged to help figure out how to create a single click experience to immediately download a document in modern SharePoint Online libraries and after much trial and error was able to do so using a little bit of JSON in a calculated column.

Here’s how to create a Download link column in modern SharePoint libraries:

1. Create a calculated column (Library Settings > Create Column) named Download and set its formula to =””

Click to enlarge

2. Copy and paste the following JSON code into the JSON formatting field of the calculated column settings.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "Download",
  "attributes": {
    "target": "_blank",
    "href": "=@currentWeb+'/_layouts/15/download.aspx?sourceurl='+[$FileRef]"
  }
}

3. Set the new column to show in the default view so it’s visible in the library and click OK.

Click to enlarge

4. Return to your library, and test it out!

And if you want anonymous users to be able to use these convenient download links, be sure to share a FOLDER link with the anonymous user(s) so they will see the file in the library alongside the one-click download link.

Optional formatting of the Download link

And while I’m not a JSON expert, I did dabble a bit in stylizing the Download link so it would look a little bit better. You can add a little bit of style to the JSON to achieve a more button-like experience (or for the advanced among you, change the element to an actual button or download icon).

Here’s how you can get started stylizing the text link (see result at bottom):

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "Download",
  "style": {
    "background-color": "gray",
    "text-decoration": "none",
    "color": "white",
    "font-size": "14px",
    "padding-left": "5px"
  },
  "attributes": {
    "target": "_blank",
    "href": "=@currentWeb+'/_layouts/15/download.aspx?sourceurl='+[$FileRef]"
  }
}
Click to enlarge

Optional usage of the file’s name instead of “Download”

One small change to the JSON will reference the file’s name for the link instead of using “Download” for all links. Then you could hide Name and just use your Download column.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "[$FileLeafRef]",
  "attributes": {
    "target": "_blank",
    "href": "=@currentWeb+'/_layouts/15/download.aspx?sourceurl='+[$FileRef]"
  }
}
Click to enlarge

Set default value of multiple lines of text (enhanced rich text type) field in SharePoint new item forms using jQuery

A recent project tasked me with providing a default value for an enhanced rich text field. Most field types allow you to set a default value out of the box. With enhanced rich text (multi-line text field type) there’s no option to set a default value.

I decided jQuery was the route I wanted to go on this one. After Googling for a fair while I finally found a response that helped.

Modifying the answer provided there, I simplified the code that worked to:

<script src="https://sharepoint.contoso.com/SiteAssets/jquery.min.js" type="text/javascript"></script>
<script>
$(function () {
                $('div[id$="TextField_inplacerte"').text("Test");
});        
</script>

Just save that code as a .js file you upload to your site. Then reference the saved .js filepath via a Content Editor Web Part placed on the new item page (newform.aspx).

Not familiar with jQuery?

The first line of the script needs to reference jQuery. In some environments this needs to be hosted in your site (I typically use Site Assets for this). In other cases, you can just reference it hosted elsewhere (not recommended, but could work for testing/short-term in some environments). I used the code from http://code.jquery.com/jquery-latest.min.js and saved its contents as a .js file of my own that I uploaded to Site Assets. Then just replace the URL in the first line of the script with the URL of the file you uploaded to Site Assets.

More than one enhanced rich text field?

The script looks for any enhanced rich text field, and in my case I only had one in the form so it was fine. If you have more than one, just replace TextField_inplacerte with the full ID of the rich text text field on your form.

Hint: User developer tools with F12 in the browser then select the field. The ID you want will end with TextField_inplacerte and likely start with your field name.

Add a “project health” stoplight status indicator to your classic sites

Note: Demo/Screenshots from a SharePoint 2016 environment.

With a little bit of work, you can have a stoplight status indicator on your project’s or team’s home page. You’ll need:

  1. A classic view site (Project or SharePoint) on which you’ll be placing the project health status indicator
  2. A CSS file in your site assets
  3. A list named “Project Health” to manage the statuses
  4. A web part for “Project Health” placed where you want it to display indicators

Note: If you have O365 or SharePoint 2019’s modern experience, explore conditional formatting with JSON instead.

Add the CSS file to your site assets

Save the first script below as stoplight.css and add to your site assets folder. You’ll need the second OR third snippet in the next section (depending on if you want to use dots or images/icons).

Create the Project Health list

Create a new list on your site and name it Project Health. You’ll need these columns:

All of the choice columns (KPI in name) will be dropdowns with these options:

  • 1 – Green
  • 2 – Yellow
  • 3 – Orange
  • 4 – Red

The other four columns (no KPI in name) are calculated columns with the following formula. Just change the “Cost KPI” to the correct column name for each (i.e. Time’s formula will be …(LEFT([Time KPI],1)…). All of the non-KPI calculated columns are number type.

You can copy and paste this from the GitHub embedded snippets in the first section.

Note: If you want to use images/icons, see bottom of post.

Modify your main list view so you ONLY see the KPI columns (displaying color names). Don’t forget to uncheck the “Title” column. We’re about to hide it from the new item form and won’t be using it.

Then, in your list settings –> Advanced settings, change “Allow management of content types” to “Yes” and click OK.

Then select your item content type.

Select “Title” and change it to hidden and OK.

Click to enlarge

Finally, so we have some “lights” to work with, go to your new list and add a “new item” with whatever initial statuses you wish.

Click to enlarge

Add a web part where you want the indicators

On your home page or dashboard, add a “Content Editor” web part and reference the stoplight.css script.

  1. Edit page
  2. Insert –> web part –> media and content –> content editor –> Add
  3. Edit web part
  4. Paste URL to stoplight.css (saved in your site assets earlier)
  5. Set chrome type to None and Apply

Insert an app part for Project Health.

Click to enlarge

“Save and keep editing” – our next step will navigate away from this page and you will lose changes unless you save now.

Edit the new “Project Health” web part you added

Edit the current view

Uncheck all of the KPI columns and check the other four (without KPI in the name). Arrange them as you wish, and add “Edit (link to edit item)” as first position. Click OK.

Edit page again, and edit the web part again. Set “Toolbar type” to No Toolbar

Set “Title” to whatever you want displayed above the stoplights on the dash/page, set dimensions to 100×300 pixels and set “Chrome type” to “Title only.”

Under “Miscellaneous” check the box for “Server Render.” Then click OK and save/publish the page. Once the page refreshes after save, you should see your stoplights.

Going forward, your users will simply click the “edit icon” next to the row of stoplights to update the status indicators.

Use images/icons instead of dots

If you’d prefer to use images/icons, you can alter the other calculated column formula included above to include an image URL in place of a dot as seen in the example below.

Copy and paste this script from the GitHub gists at the top of this post.

A better way to display “today’s events” from multiple calendars in SharePoint on your intranet home page

today at LMH

Below on the left are two traditional, out-of-the-box solutions for showing Today’s events in SharePoint. Notice how both take up a lot of extra space repeating today’s date (which we don’t need to see at all in a web part called “Today’s Events”) or showing gray space where there are no events. Soak that in – prime real estate on your home page goes to non-existent events. These also may require overlays and other manual labor processes that need adjusted every time a calendar is added or removed.

But on the right is what you could have. It uses search instead and displays events from all calendars a user has access to in one place. It shows only the necessary information on the home page and links to full details. And with a little CSS included in this post, it can look polished and themed. Imagine all you could do with that saved space on your home page…

Also seen above: Adding local weather to your SharePoint intranet home page
and a “this week’s menu” button for your intranet

Continue reading “A better way to display “today’s events” from multiple calendars in SharePoint on your intranet home page”

Adding local weather to your SharePoint intranet home page

Update 5/9/2019: AccuWeather has discontinued their widget. Watch
https://www.accuweather.com/en/free-weather-widgets for updates.

weatherI jokingly said at a recent presentation that I thought adding weather to our intranet’s home page was a good idea for employees like me who work in the basement and don’t see much of “the outside.” But it can also help with planning and decisions depending on your industry and daily routines.

Accuweather has a free script for a widget you can use that resizes perfectly on different screen sizes. I’m impressed with its simplicity and how dynamic it is.

All you need is a script editor where you’re placing the weather on your page and the following script from Accuweather.com. This script will work as-is from a straight copy and paste, but you should generate your own code from their website to paste after the closing style tag so that when clicked, users will be taken to more info specific to their location instead of mine. You can start from scratch on their site, just be sure to add the “style” tag and content below before the script they generate for you. This will get rid of a rather pesky button they include.

Upgrade your image slider on SharePoint

Your image slider is okay. But you’d like it better if it had a makeover (50 points to whoever can guess the commercial reference).

This post will show you how you can take your out-of-the-box content search web part slideshow from this:

2018-03-24_17-10-39

to this:

2018-03-24_17-26-46

This solution supports multi-line descriptions that don’t get cut off. It gets rid of that dreadful partially transparent overlay and gives you more of your photo uninhibited by messy design. It’s more modern, lighter and sure to impress. At the end, be sure to adjust the CSS to match your own color scheme and size needs.

Continue reading “Upgrade your image slider on SharePoint”

How to create a dynamic “this week’s menu” button for your intranet

People jokingly (or not) sometimes tell me the only reason for which they use the intranet is the cafeteria menu. So on a recent draft of a redesigned homepage, I introduced a prominent “Menu” button that would always be linked to the most recent menu uploaded by dining services.

menu

Previously people would click a link which took them to a document library where the current menu lived, and would open it there. 2 clicks.

I had two goals for this project.

  1. Get it down to 1 click.
  2. Never have to manually update the link for the button. Set it, forget it.

Note: this could easily be applied to newsletters, updates, meeting minutes, etc. Anything that is published on a regular basis that could benefit from an always-current hyperlinked button.

Continue reading “How to create a dynamic “this week’s menu” button for your intranet”

Intro to conditional formatting & rules/validation when customizing SharePoint new item forms with PowerApps in Office 365

2018-01-13_17-23-37.gif
This post will introduce you to some basic conditional formatting, rules & validation ideas you can implement today in your customized SharePoint forms using PowerApps. And don’t worry – if you start making changes to your form and don’t want to keep them, you can easily switch back to the original SharePoint form.

Continue reading “Intro to conditional formatting & rules/validation when customizing SharePoint new item forms with PowerApps in Office 365”