Export All Sites, libraries and lists of a SharePoint Online Site Collection

If you remember classic SharePoint, it had that nice looking (and yet unreliable sometimes) feature called “SharePoint Site Structure” which was eventually deprecated as move & copy functions were introduced. This was very insightful to understand the site and content hierarchy across the entire SharePoint farm.site-content-and-structure1

However, let’s assume you want to review your modern day SharePoint Online hierarchy every once in a while, and make sure your sites, libraries and lists are aligning to best practices as far as the depth of the site levels? Or, you just want to know what sort of sites exist in your site collection, we still have a manual way of getting those information out using a simple PowerShell script. This may not be the best sophisticated way of getting a handy report which can probably be obtained using a 3rd party tool.

Unless its a test environment, we rarely notice any Office 365 tenant without MFA enabled, so this script is Modern-Auth friendly and supports MFA. You can generate a basic report of all sites, libraries and lists in a specific site collection by defining the site collection name and CSV path to save it.

###Function to Get Lists and Libraries of a web
Function Get-SPOSiteInventory([Microsoft.SharePoint.Client.Web]$Web)
{
    Write-host -f Yellow "Getting Lists and Libraries from site:" $Web.URL
 
    ###Get all lists and libraries
    $SiteInventory= @()
    $Lists= Get-PnPList -Web $Web
    foreach ($List in $Lists)
    {
        $Data = new-object PSObject
        $Data | Add-member NoteProperty -Name "Site Name" -Value $Web.Title
        $Data | Add-member NoteProperty -Name "Site URL" -Value $Web.Url
        $Data | Add-member NoteProperty -Name "List Title" -Value $List.Title
        $Data | Add-member NoteProperty -Name "List URL" -Value $List.RootFolder.ServerRelativeUrl
        $Data | Add-member NoteProperty -Name "List Item Count" -Value $List.ItemCount
        $Data | Add-member NoteProperty -Name "Last Modified" -Value $List.LastItemModifiedDate
        $SiteInventory += $Data
    }
 
    ###Get All Subwebs
    $SubWebs = Get-PnPSubWebs -Web $Web
    Foreach ($Web in $SubWebs)
    {
        $SiteInventory+= Get-SPOSiteInventory -Web $Web
    }
    Return $SiteInventory
}
 
###Config Variables
$SiteURL = "https://sitename.sharepoint.com/sites/PWA"
$CSVFile = "C:\temp\filename.csv"
 
###Get Credentials to connect
 
Try {
    #Connect to PNP Online
    Connect-PnPOnline -Url $SiteURL -UseWebLogin
 
    ###Get the Root Web
    $Web = Get-PnPWeb
 
    ###Call the function and export results to CSV file
    Get-SPOSiteInventory -Web $Web | Export-CSV $CSVFile -NoTypeInformation
}
Catch {
    write-host "Error: $($_.Exception.Message)" -foregroundcolor Red

As you execute it, you’ll be prompted for credentials and the report will be generated (duration might depend on the number of site collections and the weight of each)

image

image

Original script used in this scenario was published in this article of SharePoint Diary

Change default File Open Behavior of SharePoint Online

The default option in SharePoint online to open files stored in document libraries is “Open in Browser”. You can leave it like that as long as you don’t have an specific requirement to change this behavior.

In some cases, end users prefer to open file by client application due to many reasons and they are fair reasons, mostly.

  1. Client application offers rich capabilities which allows users to get things done effectively and efficiently
  2. Some organizations using SharePoint as the central document management platform across the entire company. At this point they might prefer to have the files opened by client application as default.

There are various ways to enable this functionality which impact different levels.

  1. Document library level
  2. Single site collection level
  3. Across the entire tenant

If you’d like to set a specific document library to open files in client application by default. Simply log in to your SharePoint online tenant, direct to the desired library and select the radio button under the Advance Settings as you wish (This overrides the setting applied at site collection level and open documents in client application instead of browser)

Navigate to the Document Library –> Click on Settings gear –> Library Settings from the menu.

Under General Settings –> Click on “Advanced Settings”

clip_image001

To enable this for a specific site collection (applies for the entire collection unless you have chosen from individual libraries manually as shown in the screenshot above to opt out)

To do this for an specific site collection, we have to activate a site collection level feature. Simply log in to your SharePoint online tenant, direct to the desired site.

Go to Site Settings –> Site Collection Features

Click on “Activate” button next to “Open Documents in Client Applications by Default” feature

clip_image002

You can use the following PowerShell script to do get the same thing done in a bulk mode across all site collections in the tenant (ORG WIDE).

This is a SharePoint PnP PowerShell script which uses an CSV file as the source for site names.

  1. First you have to get all the site URLs exported from the SharePoint Admin Centre in Office 365 Admin Portal
  2. Then save it as an CSV file and point this script to that file (Change the CSV path in the script)

Your CSV should look like this (Site URLs separated in to individual columns, not rows. If you are having hard time getting this format, it’s quite easy, use the Transpose feature under Paste special)

clip_image001[1]

Note: Obviously, this script will only cover the existing site collections of your tenant. For any upcoming new site collection created after running this has to enable it manually again.

clip_image003

$username = Read-Host "Provide the username"
$password = Read-Host -Prompt "Password for $username" -AsSecureString
$O365credential = New-Object PSCredential($userName,$passWord)

# Chnage CSV path here
$site = Import-csv C:\Official\Tools\remain.csv

Foreach ($URL in $site.URL)
{
try {
    Connect-PnPOnline -Url $URL -Credentials $O365credential

    Write-Host "Connected to " $URL 
    Write-Host "Enabling features on" $URL 

	# Enter Feature Id & scope

    Enable-PnPFeature -Identity 8a4b8de2-6fd8-41e9-923c-c7c3c00f8295 -Force -Scope Site

    Write-Host "Disconnecting from " $URL 
    Disconnect-PnPOnline    
    }
    Catch 
    {
    Write-Host "Got error" $error
    }
}
Write-Host "Completed"

Activate a SharePoint Online feature across multiple sites using PnP PowerShell

Unlike SharePoint On-premise, the Online SharePoint platform has a limitation when it comes to Manageability. However, with new PnP capabilities, you have more power than before. One of the capability I recently used across few client tenant is “Enable-PnPFeature”.

549b7180-69d3-11e9-981a-2178dfcd7aa7

SharePoint Patterns and Practices (a.k.a PnP) contains a library of PowerShell commands (PnP PowerShell) that allows you to perform complex provisioning and artifact management actions using CSOM towards SharePoint Online (SPO) and On-Premise. This unified management capability addresses the gap between On-Premise and Online SharePoint backend.

This following short script enables an specific feature across multiple sites (as defined in the CSV file). Make sure you replace the file path and feature ID to match your requirements.

Prerequisites:

  • You must have PnP PowerShell module installed in your PC and ready to connect
  • Retrieve the feature ID list and choose the right one
  • Keep the list of sites in CSV format stored in the folder path given the script
#Activate Feature for multiple sites 

$username = Read-Host "Provide the username"
$password = Read-Host -Prompt "Password for $username" -AsSecureString
$O365credential = New-Object PSCredential($userName,$passWord)

# Chnage CSV path here
$site = Import-csv C:\Tools\SitesList.csv

Foreach ($URL in $site.URL)
{
try {
    Connect-PnPOnline -Url $URL -Credentials $O365credential

    Write-Host "Connected to " $URL 
    Write-Host "Enabling features on" $URL 

	# Enter Feature Id & scope

    Enable-PnPFeature -Identity 8a4b8de2-6fd8-41e9-923c-c7c3c00f8295 -Force -Scope Site

    Write-Host "Disconnecting from " $URL 
    Disconnect-PnPOnline    
    }
    Catch 
    {
    Write-Host "Got error" $error
    }
}
Write-Host "Completed"

OneDrive sync error: ‘You are already syncing this account’

This message appeared on plenty of end user devices across many of my clients when they try to synchronize their SharePoint Libraries using OneDrive sync client (Not OneDrive library itself though), no big deal, it was all about browser in our case (could differ in some case as well, I presume). The exact error is ‘You’re already syncing this account’. Open your OneDrive – Your Organization Name folder or sign in with a different account

OneDrive error

A common nature of the scenario was that, everyone got this error was using either Microsoft Edge or Internet Explorer. The immediate solution was using an alternative browser instead, we tried Chrome and it worked like charm.

When Chrome prompted options, choose: ‘Open URL : OneDrive client protocol

And, you can now start syncing the library

Sync start



Fix: Save List as a Template capability is missing in SharePoint Online

Are you struggling to save a SharePoint Online list as a template just like I did recently? Then you are reading the right post.

lost-luggage-airport-cyclicx-com

Well, worry no more as this article will demonstrate the solution to simply get it fixed.

Usually when you go to your SharePoint list/library settings page, you can easily spot the “save list as a template” link. But if you check the SharePoint online – this is missing.

1.1

1.2

Now let’s get our good friend back. The reason behind this, is a feature which is disabled by default.

Log in to office.com using your admin credentials and head on to Admin Center –> SharePoint Admin Center –> Classic SharePoint Admin Center (Yes ! at this moment, you really need to go to back to classics, but don’t worry at all, it wont change anything).

1.3

Go to “Settings” from the left navigation and scroll down until you see the “Custom Script” section.

Under this section, enable both these features (Allow users to run custom script on personal sites | Allow users to run custom script on self-service created sites)

1.4

And hit that “OK” button at the bottom of the page to save the changes. This might take about 24 Hours to affect as it depends on the Office 365 maintenance job schedules.

Run the following PowerShell code to enable it in “Site Collection Level” – (this affects immediately)

##SharePoint Online Admin Center and Site Collection URLs
$AdminCenterURL = "https://TenantNameGoesHere-admin.sharepoint.com/"
$SiteURL="https://TenantNameGoesHere.sharepoint.com/sites/SiteNameGoesHere"
 
##Connecting to SPO Service
Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)
 
##Enable the feature
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False

It will prompt you to provide your Office 365 SharePoint Admin credentials for the 3rd command.

1.6

Last line is for the real job !

1.7

That should immediately affect the target site collection.

Now if you head back to the list/library settings page, you will immediately notice the feature is back.

1.5

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor. Please do not copy/duplicate the content of the post unless you are authorized by me to do so.

Get Started with SharePoint Hub Sites (Part 02-CLI)

This is the part 02 of this article series. If you prefer to do this from the Admin Center, refer to my previous article here

Hub Sites in SharePoint Online is the new way of organizing your sites. Now what does that mean?

docking_thumb[5]

Based on the size of an organization, SharePoint admins create multiple sub sites to classify and organize content which usually aligns with the organization hierarchy (Department wise). There can be Team Sites and communication sites and yet, Hub sites can consist both these under one umbrella to help you relate them together based on any attribute such as Projects, Departments, Division, Region or whatever you have.

Let me put it in a simple way – Hub Sites will now help you to associate team sites and communication sites to provide a common navigational hierarchy, search, Logos and look and feel.

Hub sites allows you to standardize the site hierarchy. More importantly, it brings the consistency across all sites. Following are some of the characteristics of Hub Sites Capability:

Hub Sites[31203]_thumb[2]

Some of the Hub Site characteristics are:

  • A Common Top Navigation (Global Navigation)

A common global navigation is maintained across all connected sites of the particular Hub site.

  • Consistent Look and Feel

Sub sites inherits their look and feel from the root (Hub site) which allows you to maintain a single branding across all your sites. In a simple term, all sites are associated, which means they resides under one Hub.

  • Scoped Enterprise Search

Search acts relevantly here. When you search for something in a Hub site, it performs the search within all the sites of that particular Hub Site.

  • Site activities

User activities happens within the associated sites which means, the engagements are specific to an defined area.

  • Content Aggregation

Automatically aggregates content and displaying from multiple sites. News Web Part, Sites Web Part and Content Web Part can be used in a Hub Site to aggregate content from the associated sites and display the content on the Hub Site’s home page. This reduces a lot of manual work that developers supposed to do to get this done in the earlier days.

Provisioning a Hub Site:

There are two ways you can create hub sites in SharePoint online (Yes ! for now its only supported in SharePoint online). However, there is no template to create a Hub site so you can’t simply create a one using the “New Site” option. Instead, these are the options you have.

  1. Create a New site collection and set it as the Hub site
  2. or Promote an existing site as the Hub Site and associate other site collections to it.

A SharePoint Team Site or an Communication Site can be converted in to a Hub Site. Ensure you have the “SharePoint Administrator privilege or above” in Office 365  to perform these changes.

First and foremost, you need the latest SharePoint Management Shell installed in your machine. Get it here. If you have it installed already, you better uninstall it and install the latest version.

Once installed, launch the Shell as an administrator.

1

And here’s the first line to connect to the SharePoint online service.

Connect-SPOService -Url https://tenantname-admin.sharepoint.com

2

Provide your Admin credentials and hit next.

3

And now to create a new site to act as our Hub. Following is the PowerShell code to provision a new site with modern experience. Adjust the parameters to reflect your localizations.

New-SPOSite -Url https://tenantname.sharepoint.com/sites/HRM -Owner admin@mantoso.onmicrosoft.com -Template "SITEPAGEPUBLISHING#0" -StorageQuota 1024 -Title "HR Management"

4

Now let’s head on to SharePoint Admin Center –> Active Sites –> and notice the new site just provisioned

5

Register-SPOHubSite -Site https://tenantname.sharepoint.com/sites/HRM -Principals $null

6

If the command was successful, you will see that the Hub Site has affected with the change.

7

Add-SPOHubSiteAssociation https://tenantname.sharepoint.com/sites/CoreHR -HubSite https://tenantname.sharepoint.com/sites/HRM

8

Head back to the Active sites and you will find that the site now has the association with Hub Site.

9

The rest would be similar to the things we did in the previous article.

And, the following code can be used to control the permission of “who can associate their site with hub sites

Grant-SPOHubSiteRights -Identity https://tenantname.sharepoint.com/sites/HMR -Principals admin@mantoso.onmicrosoft.com -Rights Joins


DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Get Started with SharePoint Hub Sites (Part 01-UI)

Hub Sites in SharePoint Online is the new way of organizing your sites. Now what does that mean?

docking

Based on the size of an organization, SharePoint admins create multiple sub sites to classify and organize content which usually aligns with the organization hierarchy (Department wise). There can be Team Sites and communication sites and yet, Hub sites can consist both these under one umbrella to help you relate them together based on any attribute such as Projects, Departments, Division, Region or whatever you have.

Let me put it in a simple way – Hub Sites will now help you to associate team sites and communication sites to provide a common navigational hierarchy, search, Logos and look and feel.

Hub sites allows you to standardize the site hierarchy. More importantly, it brings the consistency across all sites. Following are some of the characteristics of Hub Sites Capability:

Hub Sites[31203]

Some of the Hub Site characteristics are:

  • A Common Top Navigation (Global Navigation)

A common global navigation is maintained across all connected sites of the particular Hub site.

  • Consistent Look and Feel

Sub sites inherits their look and feel from the root (Hub site) which allows you to maintain a single branding across all your sites. In a simple term, all sites are associated, which means they resides under one Hub.

  • Scoped Enterprise Search

Search acts relevantly here. When you search for something in a Hub site, it performs the search within all the sites of that particular Hub Site.

  • Site activities

User activities happens within the associated sites which means, the engagements are specific to an defined area.

  • Content Aggregation

Automatically aggregates content and displaying from multiple sites. News Web Part, Sites Web Part and Content Web Part can be used in a Hub Site to aggregate content from the associated sites and display the content on the Hub Site’s home page. This reduces a lot of manual work that developers supposed to do to get this done in the earlier days.

Provisioning a Hub Site:

There are two ways you can create hub sites in SharePoint online (Yes ! for now its only supported in SharePoint online). However, there is no template to create a Hub site so you can’t simply create a one using the “New Site” option. Instead, these are the options you have.

  1. Create a New site collection and set it as the Hub site
  2. or Promote an existing site as the Hub Site and associate other site collections to it.

A SharePoint Team Site or an Communication Site can be converted in to a Hub Site. Ensure you have the “SharePoint Administrator privilege or above” in Office 365  to perform these changes.

Step 1: Create a Hub Site in SharePoint (New) Admin Center (UI)

To do this using User Interface, log-in to Office 365 and direct to New SharePoint Admin Center –> Click on “Sites” from the left navigation panel –> Active Sites –> Click on “Create

new

Pick “Communications” Site template and go for “Topic” Site design (for example). Define the Site owner and Site name etc.. and hit “Finish” to create the site.

marketing

Step2: Registering Hub Site in SharePoint

Now we need to register the Hub site we just provisioned. No big deal here ! just follow these steps.

Navigate to the SPO Admin Center –> Click on “Active Sites” and that shows you all the active site collections. Choose the one you just desired as the Hub and “Register as Hub Site” from the Hub Site Dropdown as shown below.

hub2

Fill in the name of the Hub and hit “Save” to complete this.

hub3

You will notice the status is update in a few seconds for this site.

status markeing

Customize Hub Site

We now have the Hub Site created, its time to little bit of tweaking to match organizational theming (logo, theme color, navigation etc..). Something similar to following, you can change the Hub site logo, site logo, theme, navigation etc.. so that it will inherit to the site underneath (Associated)

change look

To do this let’s go to the Hub Site –> Click “Gear” Icon on the top –> Hub Site settings.

settings marketing

You also can edit the Hub site navigation that appears on all connected sites based on the central navigation (Hub). These elements shall inherit from the Hub Site to connected sites automatically. Note: When you customize the Hub Site after connecting other sites in, it will take up to 2 hours to apply the changes in the respective associated sites.

Associating Sites to the Hub:

From the SharePoint Online Admin Center, click on the checkbox next to the site collection you want to associate with the hub, then from the Hub site drop-down list choose the “Associate with a hub site” option. From the list of all the hubs you have available in your tenant, choose the one you want to connect to and hit “Save”.

associte

Choose the relevant Hub you want this site to be associated.

associate2

You will notice the status of the site is updated in a few seconds.

associate 3

Option2: You can also connect a site to an Hub Site using the “Site Information” section of the respective site.

In this case, I have a site called “Partner Engagement” and I have opened up that in the browser.

To do this, navigate to the site that you want to associate with the hub. Click on Settings gear Icon –> Select Site Information –> Choose the Hub Site Association and hit “Save”.

associate 4

You will immediately notice that Hub Site Characteristics have been inherited to the Associated site.

Moving sites across Hub Sites:

Hub Sites offers the flexibility to attach and detach (connect and disconnected in other words) associated sites. For instance, let’s say my organization decides to isolate Project management and the site needs to move from IT department to PM department. We can simply detach the site from this existing hub to a new hub.

Important Notes: However, this method only works for Modern SharePoint experience. Site collections that are in legacy mode won’t have this abilities so consider upgrading your experience soon if you haven’t !

Also, once you connect with an Hub Site, Navigation, Theme and Logos will be inherited automatically (That’s the whole idea !) to the newly connected sites.

  • You can’t associate a one Hub Site to another Hub Site (e.g. Hub A –> Hub B are isolated)
  • Also, an associated site can only be connected to one Hub Site

Dealing with the Hub Site Navigation:

Connecting a site collection to the Hub site, doesn’t automatically add links to the Top navigation of the hub site. By default, only the link of the Hub Site appears on top. You have to build rest of the Top Navigation manually in the hub sites.

Here is how: Navigate to the Hub Site –> Hover over to Top Navigation area –> Click on Edit –> Click the “+” sign to add a new link.
Click OK and –> Save.

In my case, I am adding an 3rd item to my global navigation of the “Marketing Hub.

new

A Finished navigation should look like this and it will reflect across all associated sites.

Navigation

Connected (Associated) Sites will automatically contain a link back to the SharePoint Online hub site. You will also notice that you can’t change the theme of an associated site, because it inherits the theme from the hub site and that’s the whole purpose of this feature.

For instance, have a look at this site “Statistics” of my setup. It now has all the items in the Global Navigation inherited from the Hub.

stats

Site Permissions:

When you connect a site collection to an Hub, it doesn’t impact the permissions of the associated site or the Hub. However, you have to ensure that all users who are going to join sites to the Hub site have appropriate permissions to the Hub, that’s it ! the rest shall remain the same.

Detach an associated site from a Hub:

You can disassociate a site being under a Hub if no longer needed. Your navigation and the logo will be gone after disassociating but the theme shall remain the same as it was inherited from the Hub. You need to manually set it to a different one.

To remove the existing hub site association, go ahead and select “None” in Hub Site association drop down list and Save it, simple as that !

Wish you could use PowerShell to do all these? Follow my article no 02 to get the same thins done via PowerShell.

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

Add a button in to a SharePoint List/Library to trigger a Flow (part 02-customization)

Part 02 (This article)

In my previous article, we saw how we can add a button in to SharePoint online list or library to trigger a flow in place. We are continuing with this article on how we can customize the newly added button to change its appearance (Well, let’s make it look like a button).

bc368f944e446068509494a3123d91d7

Changing the appearance:

Go to the format mode from the target button column. And we can use the following parameters to change the look and feel. My button here looks good as it stands out from the rest of the content in this space.

  • txtContent: “Define your button text”
  • color: “set a button text color code”
  • border: “set a border to the button”
  • background-color: “set a button background color”

last_thumb[2]

Applying a condition to the button:

Further more, you can customize the button to apply when a condition is true (e.g. – show a button only when the Flow have not started).

In this case, I’m going to tweak my approval Flow a little bit to maintain the status of the library items. The purpose here is to update the status of a item which is initiate for approval but still “Pending” as we using a custom status column here.

Tue4

By modifying the Approval Flow, I am adding a new step (SharePoint Update item action) to my existing flow. This new step has to be placed before the starting the start. At this stage, I have to set the status as “Pending” (static string).

ast

Then the same action added to both ending paths in order to update the status column up on “Rejection” or “Approval”. At this stage I can simply use the “Response” variable to pick up the current status value and update the “Status” column.

Tue3

Once added, it’s position looks like below.

Tue1

Define the Site URL, Choose the target library, pick the ID attribute and Response variable as shown below. Repeat the same for “No” path as well and that’s all we need to do here.

Tue2

That’s it from the Flow and we can head back to the Library to do the appearance tweaking. Go the column format mode and notice the changes I have done here. Apart from the color and background changes which I did to the button earlier, I have added a condition to display the button only when its true. Under this logic, the button would only appear when the status column = empty (“”), meaning the Flow have not started for a respective item in this library.

Tue5

And, as expected ! the logic is right therefore the condition perfectly applies. I have few documents in this library with mixed statuses (Rejected, Approved, Pending and of course some are not started yet). The button only showed for the items which are not gone through the Flow.

Tue6

Microsoft reference for JSON based column formatting is here. This article has covered many perspectives of column formatting.

And ! here’s the full JSON code of this customization which you can reuse if you have a similar use case.

If you want to start from the beginning, go ahead and read my previous article.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "span",
  "style": {
    "color": "#0078d7"
  },
  "children": [
    {
      "elmType": "button",
      "style": {
        "border": "light",
        "background-color": "yellow",
        "color": "#0078d7",
        "cursor": "pointer",
        "visibility": {
          "operator": "?",
          "operands": [
            {
              "operator": "==",
              "operands": [
                "[$Status]",
                ""
              ]
            },
            "visible",
            "hidden"
          ]
        }
      },
      "txtContent": "Send to Approval",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\": \"e290feff-0013-41f2-97dd-91a37fb84ea0\"}"
      }
    }
  ]
}

Add a button in to a SharePoint List/Library to trigger a Flow (part 01)

Part 01 (This article)

Microsoft Flow together with PowerApps undoubtedly revolutionizing the process automation in modern work places. You may have a Flow attached to a document library or list but there is no easy access to initiate that flow from the list/library itself. People have to dig in a little bit to initiate it and that’s a little bit of time consuming for constant usage.

clip_image001

With this article, we will find out how we can overcome this struggle using a little bit of JSON stuff (Don’t worry about that word, you don’t need to be a developer here). Using the Modern SharePoint capabilities, we can embed a button right in front of every item in a list or library so that people can trigger a Flow right there. New column formatting is a cool out of the box capability to get this done.

Now let’s get this started. First and foremost, you need to have a Flow created in place and have the GUID of it.

We’ll get a Flow created really quick in case if you don’t have one. If you have a Flow already in place, you can skip these basic steps

Open up your SharePoint Library and click on the “Flow” drop down on the ribbon as below. Then go to “Create a Flow

1

You’ll see a list of available templates. You can utilize these templates if your requirement matches with them. Or simply feel free to create your own. Thankfully, there are a lot of templates published by Microsoft and the community which you can re-use on various scenarios. Unless the requirement is very specific or you are really keen on creating one your own, there is no point of designing a Flow from the scratch.

2

I am adding a simple “Request Manager Approval” flow here. Pretty straight forward.

4

Next, go ahead and check if the flow is added to “My Flows” section. If so, you are good to go.

5

Now go inside the created Flow by clicking on it and copy the highlighted GUID form the address bar of your browser. We need this for our new Button.

6

https://asia.flow.microsoft.com/manage/environments/Default-f50d518a-e13c-4359-85f6-ef76484f4c32/flows/e290feff-0013-41f2-97dd-91a37fb84ea0/details

Now to add the button but before that we need a new column for this button. From the list or library, go to the very end horizontally and add a new text column to this list/library.

10

11

It should be like below after adding. You can edit this view by dragging and dropping the desired column across the library if you wish to. I’m calling mine “Approval” so it makes scenes for a column contains buttons.

a

Now, go ahead and format this column. Click on the little arrow on the newly created column and go to format mode.

b

And paste the JSON code below. replace the GUID using the target flow which you have copied to the clip board.

c

Here’s the code (you will have it provisioned as you go to format mode itself).

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "span",
  "style": {
    "color": "#0078d7"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flow"
      }
    },
    {
      "elmType": "button",
      "style": {
        "border": "none",
        "background-color": "transparent",
        "color": "#0078d7",
        "cursor": "pointer"
      },
      "txtContent": "Send to Approval",
      "customRowAction": {
        "action": "executeFlow",
        "actionParams": "{\"id\": \"e290feff-0013-41f2-97dd-91a37fb84ea0\"}"
      }
    }
  ]
}

That’s it and you will immediately notice the button applied to your column. This is how my library looks like after adding the button. It still doesn’t look like a button because of the border, background and colors of it.

14

Cool thing is ! you can customize the button to look like as you want it to be. Further more, you can also make it a logical button which has a condition behind it. (e.g. – show a button only when an item pending for approval).

Read the part 02 of this article series to further customize the button and apply conditions.

Detailed Microsoft article for this is here

DISCLAIMER NOTE: This is an enthusiast post and is not sponsored by Microsoft or any other vendor.

A great bunch of new features coming soon for SharePoint Modern Experience !

SharePoint product team just revealed news about a fantastic set of modernization features which are planned to release in the 1st quarter 2019. Microsoft been aggressively improving the user experience of SharePoint, OneDrive, in fact the whole Office 365 umbrella for the past few years.

Some of these features are brand new while some are updates for legacy SharePoint capabilities. Nevertheless, each of them looks cool and would definitely great to have. The best thing everyone love about Office 365 is, there is no additional cost for any of these updates. Let’s find out what we are going to get soon.

Bulk Check In/Check Out

2

Microsoft previously released bulk edit for list and libraries and now with this update you will have the ability to check in/out multiple records/documents at once. Have a look at the following screenshot comes from Chris MacNulty.

Document Sets

DocSet2

Document sets group related documents together with shared metadata, routing and visual experiences. They’ve been available in classic mode previously, and now you can work with them in the modern experience starting March 2019 onwards.

Signal Icons

1

Isn’t that cool when you have a nice visual cue right next to each file as the status? Here are the new list of status signals that you will soon be able to see in your tenant. There will be more signals and the best news is its not going to just limit to SharePoint but also will be available on OneDrive, Teams, and Office Clients too. Wait no longer than February !

Column Totals

3

Custom views allow you to add calculated fields, such as totals or averages, to the footer of a group or the entire list. Now, totals will display in the modern view without forcing users back to the classic interface. Totals will also show in the modern web parts for lists and libraries.

Sticky Headers

SharePoint is known to have large repositories. Large lists and libraries always takes a scroll vertically and horizontally. With Sticky headers, you will have the column headers pinned at the top of the scrolling window so it helps you identify list values as you move vertically and horizontally through the view. And ! column headers will also remain in place inside the list/library web parts across any page you have added them.

Add Columns In-between Column

4

Soon you will be able to add a column in between another columns which cuts off the time it takes to reach the end of the column headers. Again, this will help a lot in wider lists/library views where you have lots of columns added in to. Just hover you mouse on the edge between two columns and you will immediately notice the (+) icon.

Column Drag and Drop

5

Guess what! You don’t have to dig in and modify the views anymore. Moving a column within a list or a library, simply drag it and drop to where you want it to be. Easier right ?

In a quick note: Microsoft always commits to deliver efficiency, reliability and usability across all products. Feel free to raise you voice if you have any idea you think worth actioning here – https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration

Images: Microsoft (original post is here)