Swetha Sankaran, Microsoft Most Valuable Professional, Office Servers and Services, @SharePoint @Office365 #MVPAward

Great news to share with my peeps! I am now a Microsoft MVP(Most Valuable Professional) Office Servers and Services. 

A coveted award that has been a dream of mine for years now., its now become a reality and am extremely excited, thankful, touched, proud and feel humbled all at the same time!

If you can dream it, you can do it! is something I’ve always believed in. As long as your intentions are pure, as long as you are helping someone, or even yourself, become a better being; be it building a skill set or oneself really, you can do whatever you set your heart to and desire. You can affect changes and help other grow together with you. That is what I strive to do and will continue to during the rest of this journey of my life. Really glad to have a few AMAZING passengers on my side thanks to this team of mine! :)I think, the supreme being is listening and granting my wishes, one at a time!

God/Goddess, sure are kind to all and they are watching over us at all times. Good luck to my fellow MVPs, and to the thousands of aspiring MVPs as well.

To reiterate-“If you can dream it, you CAN do it and become it!” Obstacles are but driving forces to propel us towards greater goodness and subsequent rewards and recognition if you want them.

Here is the official welcome mail from Microsoft about my MVP award! Carts loads of thanks #Microsoft! This means a LOT to me, to be honored for my technical leadership and a dream come true!!

 

2017-03-03_22h42_25

Content Search Web Part in #Office365 #SharePoint online

Found something interesting while working with Content Search Web Part in SharePoint online. This web part is really powerful and least used in my opinion. To use this effectively, its best if we have a well designed Taxonomy term store that users have diligently tagged their documents with. Or not! 🙂

In this case, I just wanted to look at all the available sites in a site collection from a page for maintenance purposes.

  • Created a custom search results page in SharePoint with a very creative name SearchResults.aspx.
  • Inserted > Web Part > Content Rollup > Content Search Web Part > Change Query

When we look at the Query text of Content Search Web Part in advanced mode by default we see path:”https://abc.sharepoint.com/sites/Forms/Search”  (IsDocument:”True” OR contentclass:”STS_ListItem”), since I just wanted the sites under a site collection, I tweaked the Keyword Filter = Only return sites and Query Text to  path:”https://lcpsorg.sharepoint.com/sites/Forms” contentclass:STS_Web

In the Search Results Preview found two new  sites which I could not remember creating. NintexWorkflowForOffice365 and  FormsApp
– FormsApp redirects to Nintex forms app with options to manage the form on the site (Unpublish all forms, Export all forms and manage the base form)
– NintexWorkflowForOffice365 redirects to workflow manager for the site.

To remove these two sites from my search result, I just modified the Query Text like so:

path:”https://lcpsorg.sharepoint.com/sites/Forms” contentclass:STS_Web -SiteTitle:Nintex

This removed the list of sites from my search results that had Nintex in its title.11-15-2016 10-03-49 AM.png

Here is the resulting CSWP and Search Box in the SearchResults.aspx page:

11-15-2016 12-25-23 PM.png

Note: Default display template is used and image set to SiteLogo

Query Text of Search Results web part required to display Documents library listings can be in the following format

path:”https://abc.sharepoint.com/sites/xyz/Shared%20Documents/*”  (size>0)(IsDocument:”True” OR contentclass:”STS_ListItem”) with REFINERS set to STS_ListItem_DocumentLibrary

Employee Status Report using @MicrosoftFlow and #SharePoint online in #Office365

Requirement:

Employees in a department/ team should submit a weekly status report to their team leads.

Schema of the list: 11-14-2016 9-49-06 AM.png

To setup a new Flow for this O365 SharePoint list, just click on ‘Flow’ and choose  ‘Create a flow’. If you have already attached a flow to the list, then obviously we go to ‘see’ our flows.

11-14-2016 9-57-57 AM.png

Note the URL 🙂 Its refreshing to see that its disconnected from sharepoint. Makes sense since we are now talking about connecting various ‘services’ and creating a workflow that flows through different apps and not restricted to one!

11-14-2016 9-59-13 AM.png

When you click on the flow, it’ll open the designer with all its actions and option to include dynamic items from our list/user profile. Easy enough!

If you want to redirect back to your item, you can

  • Get the URL of the list item(any of the item)
  • Include HTML anchor tag and insert the dynamic ID content form your list in place of the static ID for the item in your URL.
  • Set is HTML attribute to “Yes”.

Its interesting to not that the Yes gets changed to True once Flow is updated. Here is the Flow at a glance

Flow-Status Report.png

Now that the #MicrosoftFlow is setup, when a new item is created in a list, it gets my profile information, sends out an email to the user who initiated the workflow as well as the ‘Person or Group’ from Lead column in the list.

Result is the email below. Click here hyperlink is our custom link that takes us to the corresponding item view.11-14-2016 10-10-53 AM.png

There, your flow is now setup and running for users!

 

 

 

Setting reminders on shared #SharePoint Online Calendar using #Nintex workflow for #Office365

Requirement:

Your customer has a calendar that they use for booking a shared resource(think labs, meeting rooms, equipment etc., how to set this up is described in an older blog of mine: https://swethasankaran.com/2015/10/06/shared-resources-booking-system-for-office-365-sharepoint-online/ )

Now that the calendar is setup, one wants to email notification to the user who is adding an event to the calendar 24 hours prior to the event start time. How do we do that?

Using #Nintex Workflow for #Office365 setup on “Item Creation” as seen in the image below.

Two key actions to note are Add Time To Date and Pause Until Date

  • Create a workflow variable (var24hrs in this examaple)
  • Insert Add Time To Date action make sure you set the Hours to -24 from Current Item “Start Time” from current item and output that to var24hrs variable. This will have the value of 24hrs before the Start Time of the event.
  • Insert a Pause Until Date action and set the Date property to the custom variable you created and set value in the steps above var24hrs
  • Follow it up with ‘Send an Email‘ with the body of the text as you wish to send to event requestors.

Pro Tip: Email can be dynamic with values from your Calendar list and you can include a hyperlink for the item URL from workflow context section of your workflow designer, to redirect the users to the actual event form from the email notification.

Calendar Workflow.png

And PUBLISH!

Now your users(who you set up in the To, CC, BCC) will get reminder notifications 24 hours before the event Start Time.

Note: Since we are use Pause until Date action, if a requester submits event for ‘today’ they will receive the notification immediately.

[ #Office365 #SharePoint ] The new landscape for end-users, part 1: Groups and Modern Document Library

Very informative set of articles!

aOS 365

Fourth article from a series on [ #Office365 #SharePoint ] The new landscape

  1. The new landscape for power users
  2. The new landscape for developers and IT Pros

With such a flow of news (new products, new features, new capabilities) we started to describe in the 3 first post of this series, it can be difficult for customers to catch up and have a clear idea of where we are in terms of functionalities and how change will impact them.

So let’s try to summarize a little bit what have been announced and delivered since #futureofsharepoint event in May.

1. Office 365 Groups are now the foundation of…

View original post 623 more words

OneDrive SharePoint Storage Metrics

Wondering how to get how much storage is taken by what folder of your OneDrive personal sharepoint site?

Just a couple clicks to get to your storage metrics:

https://yourorg-my.sharepoint.com/personal/username_companyname_org/_layouts/15/storman.aspx

Storman.aspx gets you the info. You can even drill down to your folder to get check the usage details.

2016-10-19_14h13_09.png

Pretty cool eh!

Now, to get the storage size of your OneDrive documents via powershell. Login to SharePoint Online Administration Shell with your admin credentials.

connect-sposervice “https://tenant-admin.sharepoint.com”

GetSPOSite https://tenant-my.sharepoint.com/personal/user_name_tenant_onmicrosoft_com” Detailed | select url, storageusagecurrent, Owner

2016-10-19_14h17_10.png

 

Page status bar – revert to template message

In your SharePoint online page with webparts (custom views and scripts) when you restore a previous version of the page, the message “The current page has been customized from its template. Revert to template” is displayed at the top of the page.

2016-10-05_14h39_05.png

Yes, I know it is customized from the template. And yes, I am the culprit and it was intentional for I wanted a previous version restored!

Click Revert to template(providing its just restoring that caused it, you are promptly warned about the same)2016-10-05_14h47_05.png

If you are unsure, then make sure you copy all your custom scripts from the page. Revert the template and you can add them again.(I didn’t have to…but ya know, that makes the best sense!)

Don’t want to go through that? Need to fix it pronto before a demo and just have 4mins and 20 seconds-yes, I timed it, including a restroom break too in between(?!?) Just hide that div using ScriptEditor webpart or including it in one of your existing scripts!

$pageStatusBar{

display:none !important;

}

2016-10-05_14h43_00.png

Delete rows from your #Office365 SharePoint Online List using powershell

Necessity is the mother of invention AND research. Its also the mother of all workflow history/list row deletions using all powerful CSOM and POWERSHELL!

So, I was working on an application and just when I thought I had it all done to perfection(this is very relative isn’t it!) I found that electronic signature fields that I was capturing from workflow back to my list was NOT being updated right. I do what any good logger(yes! I am one) does, and check Workflow History list for the first time in a month to see this beautiful message that everyone dreads…i do alteast and have been putting it off with manual deletes for a while.

I am done with this..so combining a bunch of powershell scripts from a previous app and adding on list item delete function, I created a script that you can use to run in your SharePoint online environment to delete ANY number of rows YOU choose from ANY list in your site. (For performance reasons, batch deletes are better for larger number of rows, but thats not the focus of the post here)

Dreaded Message:

9-27-2016 12-22-28 PM.png

Steps taken to delete:

Create a powershell script from an editor of your choice(I switch between visual studio code and 2015)

You can checkout the script at GitHub: https://github.com/SwethaSan/DeleteRowsWithPowerShellCSOM

Once you save your powershell script in your SharePoint site assets > scripts or which every folder you choose to save it to.

You can run it from SharePoint Online Management4 Shell and enter required details

9-27-2016 12-37-07 PM.png

cls
#Import SharePoint Online Management Shell
Import-Module Microsoft.Online.SharePoint.Powershell -ErrorAction SilentlyContinue

Add-PSSnapIn Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#region Input Variables

$SiteUrl = Read-Host -Prompt “Enter the site name in which your list resides”
$UserName = Read-Host -Prompt “Enter User Name”
$SecurePassword = Read-Host -Prompt “Enter password” -AsSecureString

#endregion

#region Connect to SharePoint Online tenant and Create Context using CSOM

Try
{
#region Load SharePoint Client Assemblies

Add-Type -Path “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll”
Add-Type -Path “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll”
Add-Type -Path “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.WorkflowServices.dll”

#endregion
#region connect/authenticate to SharePoint Online and get ClientContext object..

$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName, $SecurePassword)
$clientContext.Credentials = $credentials

Write-Host “Connected to SharePoint Online site: ” $SiteUrl -ForegroundColor Green
Write-Host “”

#endregion
#region Load SharePoint List
if(!$clientContext.ServerObjectIsNull.Value)
{
$web = $clientContext.Site.RootWeb
Write-Host $web

$clientContext.Load($web)
$clientContext.ExecuteQuery()

$listName=Read-Host -Prompt “Enter the name of the list you wish to delete rows from”
Write-Host “List Name” $listName -ForegroundColor Green

$list=$clientContext.Web.Lists.GetByTitle($listName)

$clientContext.Load($list)
$clientContext.ExecuteQuery()

$itemsCountToDelete = Read-Host “Enter number of items to delete from your “$listName ” list”
Write-Host $itemsCountToDelete “rows to be deleted from: ” $SiteUrl -ForegroundColor Green

$query = New-Object Microsoft.SharePoint.Client.CamlQuery
$query.ViewXml=”<View><RowLimit>”+ $itemsCountToDelete +”</RowLimit></View>”

$items=$list.GetItems($query)

$clientContext.Load($items)
$clientContext.ExecuteQuery()
Write-Host “Items count ” $items.Count
if ($items.Count -gt 0)
{
for ($i = $items.Count-1; $i -ge 0; $i–)
{
$items[$i].DeleteObject()
}
$clientContext.ExecuteQuery()
}
}
Write-Host $itemsCountToDelete “rows deleted from: ” $SiteUrl -ForegroundColor Red

#endregion

}
Catch
{
$SPOConnectionException = $_.Exception.Message
Write-Host “”
Write-Host “Error:” $SPOConnectionException -ForegroundColor Red
Write-Host “”
Break
}

#endregion

References:

http://www.enjoysharepoint.com/Articles/Details/how-to-delete-list-items-in-sharepoint-online-using-client-21587.aspx

http://www.sharepointnutsandbolts.com/2013/12/Using-CSOM-in-PowerShell-scripts-with-Office365.html