PowerShell script to retrieve Groups, Users, Permissions and URL from Site & its Sub-Sites in SharePoint Online

function connect-site($webs,$cred){
	Connect-PnPOnline -Url $webs -Interactive

function get-sitepermission($web,$cred){
connect-site -webs $web 
if($web -eq $parentsitename){ 
	#Write-Host "Parent site permission" $web 
	$Pgroups=Get-PNPGroup -Includes Users
	foreach($Pgroup in $Pgroups){ 
		$DLGP = "" | Select "SiteUrl","GroupName","Permission","Users" 
		$pPerm=Get-PNPGroupPermissions -Identity $Pgroup.loginname -ErrorAction SilentlyContinue |Where-Object {$_.Hidden -like "False"} 
		if($pPerm -ne $null){ 
			#write-host $DLGP.SiteUrl
			#write-host $DLGP.GroupName
			$DLGP.Users = $Pgroup.Users.Title -join ";"
			#write-host $DLGP.Permission
			$rec+= $DLGP 
foreach($subweb in $subwebs){ 
	connect-site -webs $subweb.Url  
	#Write-Host $subweb.Url 
	$groups=Get-PNPGroup -Includes Users
	foreach($group in $groups){ 
		$DLGP = "" | Select "SiteUrl","GroupName","Permission","Users" 
		$sPerm=Get-PNPGroupPermissions -Identity $group.loginname -ErrorAction SilentlyContinue |Where-Object {$_.Hidden -like "False"} 
		if ($sPerm -ne $null){ 
			#write-host $DLGP.SiteUrl
			#write-host $DLGP.GroupName
			#write-host $DLGP.Permission
			$DLGP.Users= $group.Users.Title -join ";"
Write-Host $subweb.Url "permission fetched!" 
get-sitepermission -web $subweb.Url 
return $rec 
#Input parameter 
Write-Host "Enter wilcard"
$wild = Read-Host 
Write-Host "Enter Site Name"
$sitename = Read-Host
$parentsitename="https://xyz.sharepoint.com/"+$wild+"/" +$sitename
$outputPath= "C:\xyz\abc\"+ $sitename +"groups permissions.csv" 
#Write-Host $parentsitename
$Sitepermission=get-sitepermission -web $parentsitename  -Interactive
$Sitepermission |Export-Csv -Path $outputPath


C:\xyz\abc> .\getthisscript.ps1

Enter wildcard


Enter Site Name


https://abc.sharepoint.com/sites/mySite/who permission fetched!

c:\xyz\abc\mySitegroups permissions.csv



Full Control
She Her; He Him; Them They;

This is a continuation/add on to technet article: https://social.technet.microsoft.com/Forums/en-US/77a8e9ef-56a5-47e4-9b54-209f37687013/sharepoint-online-subsite-permissions-list-credentials-promt

A human can become god.

Manithan enbavan deivam aagalam

A human can become god.

(2)வாரிவாரி வழங்கும் போது வள்ளலாகலாம்
வாழைப் போல தன்னை தந்து தியாகியாகலாம்
உருகி ஓடும் மெழுகு போல ஒளியை வீசலாம்
vaari vaari vazhangumpodhu vallal agalam
vaalai pola thannai thanthu thyagi agalam
urugi odum melugu pola olaiyaai veesalam.

When he gives ( unconditionally and without any selfishness ( in scoops and heaps) ), he becomes a king (philanthropist),
Just like a banana tree ( whose every part is useful – signifying ultimate sacrifice) , one could sacrifice for the good of people and be remembered as a great human,
he could spread light ( all goodness and positive energy), like the wax in the candle that melts itself to spread light.

(3)ஊருக்கென்று வாழ்ந்த நெஞ்சம் சிலைகளாகலாம்
உறவுக்கென்று விரிந்த உள்ளம் மலர்களாகலாம்
oorukenru vaalntha nenjam silaigalagalam
uravukenru virindha ullam malargalagalam

the hearts (people) that lived for the welfare of the society may become (noble) statues ( as a mark of respect),
a person who opens up (helps in need) for a relationship will bear a heart that is as beautiful and pure as the beautiful flowers. ( emphasizing the importance of helping people around oneself and the concept of inclusion)

(4)யாருக்கென்று அழுத போதும் தலைவனாகலாம்
மனம்! மனம்! அது கோவிலாகலாம்
yaarukenru aludhapodhum thalaivanagalam
manam manam adhu kovil aagalam

When one cries for the problems of others and gives a helping hand, he becomes a great leader,
such a heart with all these qualities, becomes a temple.

(5)மனம் இருந்தால் பறவை கூட்டில் மான்கள் வாழலாம்
வழியிருந்தால் கடுகுக்குள்ளே மலையைக் காணலாம்
manam irundhal paravai koottil mangal vaalalam
vali irundhal kadugukulle malaiyaai kaanalam

If you have the heart then even in a bird’s nest you can accommodate a deer ( emphasizing that you are never too small to help, its all in the mindset),
if you have the vision/can see the path, then even in a grain of mustard ( something so small) you can envision a mountain ( something big) ( means that even in/with small thing , you can achieve great heights),

(6)துணிந்துவிட்டால் தலையில் எந்த சுமையும் தாங்கலாம்
குணம்! குணம்! அது கோவிலாகலாம்
thunindhu vittal thalaiyil endha sumaiyum thangalam
gunam gunam adhu kovil agalam

if you dare, then you can carry any amount of burden on your head ,
such a virtue or trait , will be considered equivalent to a temple

Credit: Lyrical Delights.

NO Regrets – Break free of it! Now!

Once I was a little baby,screaming for colostrum.
Divine being obliged, her suffering faded away by the life it birth.
Satisfied I slept.

Then I started crawling,screaming., hungry to be fed,
divine being that she is, recited stories and fed me health
Hunger quelled, I slept.

Then I was a school goer,
screaming for the latest bag,
divine being to the rescue,
sold her jewel to get the best her princess deserves.
Satisfied I slept.

Then came college, screaming again,
I demanded a vehicle,
My divine lady, pledging her property.
Ensured my comfort while travel

Then I was a young one,
longing for a companion,
My divine angel, gave her all, handing over me to a stranger.
Dreams of a happy life, forgetting her emptiness.

Roles reversed, the divine one, being me,
My angel screaming in pain, she cries, her tears, breaking my heart.

Jewels, savings, richness naught, but I am here, giving my all.
Trusting a day, where her screams morph to smile.

I want my divine mother back.
I pray, the supreme being, comfort be her new normal.
Joy be her eternal state.

I never thanked her, for the sacrifices she made.
I barely acknowledged her them at that time.
I do now, I hold her tight, I whisper daily, that I love her,

I profess my love, my wholehearted thanks,
I hold her hand, apologizing for all that I did and did not do.
I will never let her go.

My divine angel, my single mom, my wonder woman and my hero!

Give yours a big hug too love, egos are human made, they are passing clouds,
they can be shattered, just as fast as we raised that wall.
Take your strongest will powered hammer, break that shit apart.

Hug your loved ones tight,For relations are all that you’ve got!

RAGHU – the wannabe inspector – Erode Diaries

Erode Diaries: Ragu – the wannabe inspector

Swetha Sankaran

Author, Seeker, President FEDSPUG-WSPDC,Microsoft MVP (Office 365 Apps an… See more22 articles 26

Erode Diaries:

Its that time again, a followup visit to our amazing doctor, given the erratic sugar (94,78 and 300? PP) so off we went to the docs. Wish I had my car, atleast my motorbike, but neither at my disposal but with a fancy bike which mom is totally wary of even looking at – you can blame it on her TKR(total knee replacement) on both knees. We marched towards our friendly autorickshaw stand.

A small walk to our regular stop at our favorite auto rickshaw corner ensued. There, we encountered a new driver, and a tiny kid sidekick, who too was assisting. Such a smart lad, barely 10 years old. Aiding his dad, starting the rickshaw, signaling the drivers as indicators for left/ right cuts. I was very impressed with his pleasant demeanor. Curiosity peaked in my mind, and the mother in me wanted to know why and what a child is doing here, hanging out with his dad while at work. With a smile in his face, he said its Sunday. Fair enough I thought, then when we gave directions to hospital, the dad mentioned that he had himself suffered stroke twice. After his wife moved on. We immediately thought, she departed. It broke our heart. Both mom and I were taken aback. Ragu, the child, his face lacking any strong emotion but a shameful silence.

Dad then explained that he runs a local art troupe, had a fleet of lorries, doing quite well for himself, until one fine day, his wife left wiping out all his belongings, leaving the child under his care. This betrayal obviously lead him to serious health issues. Now its just the two of them. Ragu cooks, cleans and studies like a lion. Class first if not second at our local Erode CSI. What a gem of a child. I could relate with him. His dad said with tears, words struggling chocking in his throat, that at the end of his duty, all he can do is take medicines and rest. Ragu, the child is now his fathers caretaker. The innocence which should be playing outside, sans all worries of the ugly realities of life, is now in-charge of making his own destiny while taking care of his father.

I immediately felt a strong kinship towards the baby. He even looks like me, my mind said, or perhaps its me seeing a slice of myself in him. Taking on responsibilities, wise and hard beyond their ages and still keeping a positive attitude. Grief…is not what is portrayed in mainstream media as cries, sobs, defeat and wailings, grief is pretending everything is fine, while the heart longs for stability and reasoning. The answer to why me and the burning fire in the belly, that needs to know its path to success.

Ragu dreams of being a policeman. It once was a long lost dream of mine. I can understand the sentiment behind it and attraction towards a position that serves justice to downtrodden. Kids that are carrying burden beyond their potential, have an innate need to prevail justice and protect others in their situation and help bring them up.

I have a few connections who are in the police force, if any one of you is kind enough and have some spare time, if you could kindly reach out to me, it will be my pleasure and humble request to introduce to you this gem of a child. If you could find it in your hearts to mentor this beautiful soul and enable him to realize his dreams, I’ll be forever thankful for you. 

Ragu could very well be my child. If things were different, I would LOVE to take him under my wing, but being a situational prisoner myself, this is the least I could do, for the time being.

For the sake of his privacy, I am not including his picture, but you know where to reach me. Call/ Mail/ Reach out. Lets all pay it forward friends, and Goddess will help us in mysterious way during the time of our needs. OM! Sub Inspector, @krishnakumar sir please help!


0 CommentsComments on Swetha Sankaran’s article

Comments settings

Swetha Sankaran

Add a comment…Images

Swetha Sankaran

Author, Seeker, President FEDSPUG-WSPDC, Microsoft MVP (Office 365 Apps and Services), Common Securitization Solutions

More from Swetha Sankaran

See all 22 articlesMove slides leftMove slides right

Status is online

 Tap for popup settingsType to search for connections and conversations.

The circle of life – Erode Diaries

What are we chasing after? – Dhanalakshmi

Walking along a quiet road in need of à break from over contemplation, I heard a voice calling out from within a gated building. She called me lovingly ‘kannu inga vas saami’. She reminded me of my grandmother, I went to her and enquired about her well being. She said she wants some eggs to eat. Of all the things one could crave for, she craved boiled eggs. I complied ofcourse, went on a egg hunt. One good thing in Erode is everyone is friendly. I bought 4 eggs, handed it to a hotel nearby requesting them to boil it for her. I also ordered Briyani. Figured if grandma craved eggs, she might appreciate chicken Briyani too? And I wasn’t wrong. She was over joyed to see it.

Now, the only problem was how do I hand it to her? Her Gate was locked, no side door, she couldn’t walk, what to do? So, taking the risk of putting my 40 year old knees to test, I jumped over the fence and fed her the delicious dishes.

She could barely stand up. Longing for companionship she sits daily in those same steps facing road side, talking to bypassers hoping someone would pay attention and converse with her Not all of them would have sincere intentions. It worries me to think of her longing for company and innocence. But she insists on being independent. Her house spick and span, devoid of clutter or dust. Clean like a shining granite top, meticulous attention to precise location of things where they are set. Utensils, medicines, beds et all. 
She shared her story, her suffering, which are too heavy to share for the fear of sadenning my readers. All i can say is that she prays for peaceful final exit. I cried with her, hugged her for a long while consoling that everything happens for a reason and that I’ll revisit her before I leave. She innocently and lovingly asked if I would just stay with her forever. Honestly, had it not been for my duties as a mother and daughter I might have. 😦 But perhaps in another time and life our paths cross again and I can be of service to her.

All our lives are but a fickle, temporary, fraction of occurence. To let all the mundane ego, money, hurry hurry attitude, power struggle, pissing contest(pardon my strong language) take up our mind space is all but a waste of all our energies.

I wish there was a way I could take care of all these lonely suffering souls. I know I’ll be one among them in a few decades, but if I can get the privilege to alleviate the sufferings of as many sweet, sad souls in the process, I would consider myself blessed and leave the world knowing I helped someone.

She said shell never forget me for the rest of her life. It has been years since I sought blessings from anyone since my grandparents demise, I prostrated and touched her feet today seeking her blessings.

Dhanalakshmi Patti – I hope I get to bid farewell when I leave and I’ll never forget you either.+3

Atmastakam/ Nirvana Shatakam – TRUTH for all of us who look inwardly and realize

मनोबुद्ध्यहङ्कार चित्तानि नाहं
न च श्रोत्रजिह्वे न च घ्राणनेत्रे ।
न च व्योम भूमिर्न तेजो न वायुः
चिदानन्दरूपः शिवोऽहम् शिवोऽहम् ॥१॥

mano buddhi ahankara chittani naaham
na cha shrotravjihve na cha ghraana netre
na cha vyoma bhumir na tejo na vaayuhu
chidananda rupah shivo’ham shivo’ham


I am not the mind, the intellect, the ego or the memory,
I am not the ears, the skin, the nose or the eyes,
I am not space, not earth, not fire, water or wind,
I am the form of consciousness and bliss,
I am the eternal Shiva…

न च प्राणसंज्ञो न वै पञ्चवायुः
न वा सप्तधातुः न वा पञ्चकोशः ।
न वाक्पाणिपादं न चोपस्थपायु
चिदानन्दरूपः शिवोऽहम् शिवोऽहम् ॥२॥

na cha prana sangyo na vai pancha vayuhu
na va sapta dhatur na va pancha koshah
na vak pani-padam na chopastha payu
chidananda rupah shivo’ham shivo’ham


I am not the breath, nor the five elements,
I am not matter, nor the 5 sheaths of consciousness
Nor am I the speech, the hands, or the feet,
I am the form of consciousness and bliss,
I am the eternal Shiva…

न मे द्वेषरागौ न मे लोभमोहौ
मदो नैव मे नैव मात्सर्यभावः ।
न धर्मो न चार्थो न कामो न मोक्षः
चिदानन्दरूपः शिवोऽहम् शिवोऽहम् ॥३॥

na me dvesha ragau na me lobha mohau
na me vai mado naiva matsarya bhavaha
na dharmo na chartho na kamo na mokshaha
chidananda rupah shivo’ham shivo’ham


There is no like or dislike in me, no greed or delusion,
I know not pride or jealousy,
I have no duty, no desire for wealth, lust or liberation,
I am the form of consciousness and bliss,
I am the eternal Shiva…

पापं न सौख्यं न दुःखं
न मन्त्रो न तीर्थं न वेदा न यज्ञाः ।
अहं भोजनं नैव भोज्यं न भोक्ता
चिदानन्दरूपः शिवोऽहम् शिवोऽहम् ॥४॥

na punyam na papam na saukhyam na duhkham
na mantro na tirtham na veda na yajnah
aham bhojanam naiva bhojyam na bhokta
chidananda rupah shivo’ham shivo’ham


No virtue or vice, no pleasure or pain,
I need no mantras, no pilgrimage, no scriptures or rituals,
I am not the experienced, nor the experience itself,
I am the form of consciousness and bliss,
I am the eternal Shiva…

न मृत्युर्न शङ्का न मे जातिभेदः
पिता नैव मे नैव माता न जन्मः ।
न बन्धुर्न मित्रं गुरुर्नैव शिष्यं
चिदानन्दरूपः शिवोऽहम् शिवोऽहम् ॥५॥

na me mrtyu shanka na mejati bhedaha
pita naiva me naiva mataa na janmaha
na bandhur na mitram gurur naiva shishyaha
chidananda rupah shivo’ham shivo’ham


I have no fear of death, no caste or creed,
I have no father, no mother, for I was never born,
I am not a relative, nor a friend, nor a teacher nor a student,
I am the form of consciousness and bliss,
I am the eternal Shiva…

अहं निर्विकल्पो निराकाररूपो
विभुत्वाच्च सर्वत्र सर्वेन्द्रियाणाम् ।
न चासङ्गतं नैव मुक्तिर्न मेयः
चिदानन्दरूपः शिवोऽहम् शिवोऽहम् ॥६॥

aham nirvikalpo nirakara rupo
vibhut vatcha sarvatra sarvendriyanam
na cha sangatham naiva muktir na meyaha
chidananda rupah shivo’ham shivo’ham


I am devoid of duality, my form is formlessness,
I exist everywhere, pervading all senses,
I am neither attached, neither free nor captive,
I am the form of consciousness and bliss,
I am the eternal Shiva…

Beautiful Interactive Navigation for SharePoint Online​


Ease of use for your site visitors. No need for the clunky left navigation or extremely wide top navigation. As much as we love our sub sites and its child sites our own, they can get pretty long and nasty looking jumble…

    Ease of navigation ( DUH!)​
    Interactive experience​
    Enhanced user experience, responsive design, visual guidance ​
    Ease of maintenance​(They don’t have to wait around for those smart developers to come add their fancy scripts to include subsite that we created yesterday, you know… we shall be self sufficient, include an item in the dynamic list and be done with it!)
    Above all else, a fashionable landing page(if I say so myself, what? Only I say that? hmmm…whatever.gif..) that attracts users without losing proper functionality​
    Also, ummm…….Why the heck NOT? ​

 Basic Building blocks

  • Team/ Publishing Site (This solution uses JavaScript, Bootstrap libraries. We kinda need to insert CEWP/ScriptEditor)
  • List (We are gonna hook this up with the script to read and render the tiles – ahem..ahem…dynamic ahem..)

    • Title (Out of the box, suffices. Nothing fancy)
    • ImageURL (Single line of text)
    • RedirectURL(Single line of text)
    • Description(Single line of text)

Script &  (You can unleash your creativity here… ie., as acceptable by your team)mask.jpg


  • Go to the home page of your site where you want to insert this navigation widget
  • Why home? Well, you can go to ‘welcome’, ‘adios’,’ciao’,’namaste’ pages of your choice. I chose
  • ‘HOME’  > Edit Page > Insert Content Editor web part > Add the script file reference

(them things need to have a collection of site navigational items to be displayed in the fancy tiles widget!)

Picture1.pngThose that noted the change in list experience, YES, its classic

  • You can switch back and forth between modern/classic
  • Cause you can. I couldn’t quick edit in the modern view, I attribute it to the gods of cloud being upset with my zeal to share a little much
  • There you go! You have the list with some pretty rows!


This script file/reference needs to go into either a Content Editor Web Part or Script Editor web part.(BuildTiles.js)


This is a lot of fun to mess with and unleasing your inner artist. (StyleTiles.css)

Now create a page in your SharePoint site and insert the web part with your script file.(BuildTiles.js)

Thats it kids! Here ya go, your custom attractive navigation tiles!
No video no proof! Right? 😉
Here you have the demo of the list, and how the interactive navigation can be used in your SharePoint site.

Enjoy your fancy navigation for SharePoint Online-Office 365!

Keep learning and sharing…



Erode Diaries: Homelessness – Its just a state of mind

We live in a really busy street downtown in Erode. You slip on a stone, and you’ll land in either a hospital or a pharmacy or an eatery errr…multiple eateries which people lovingly call as MESS. Great food, great people, friendly folks and all of them crowded.

As crowded as it gets, the localities remain the same. Everyone knows another by their names. They know their acquaintances parents and even grandparents. Growing up in such a tight knit environment I recognize everyone no matter how many years passed since my last trip here. I know them all, and they know me.

Then I noticed this tiny man, dressed in dirty shirt, hair uncombed to the point of tangled mess, he smiles at me. I do the same, I inquire if he had anything to eat, sometimes, he says yes, other times, he says no, then I give him 20 Rupees to cover for lunch/coffee/tea of his choice. I have never once seen him eat though. I’ve caught him smoking beedi, quietly contemplating on things, his busy mind being the only thing privy to his thoughts, as he observers the passerby intently.

I was curious about his story, so I interviewed him today, his name is Sri(changed to avoid true identity), he proclaimed that he has some medical illness and therefore refuses to cut his hair. I tried to convince him, to-take him to a good barber shop and get him a nice hair cut and perhaps get a clean shirt. He politely refused, saying he will do those when his ailments are cured.

He pointed to his hands and said they are not functioning. They seemed perfectly fine to me. He said his body is melting, which again seemed perfectly fine to my eyes. I am not sure what he is suffering from. Perhaps, some kind of mental illness that needs proper care and treatment? Who would take the responsibility to do that for a stranger? I would, if I lived here., or if I was enabled to treat, but I am a mere vagabond, a traveler, who is neither her nor there.

Least I could do then was visit a pharmaceuticals nearby and inquired about this gentleman, they told me his story and I was dumbstruck. His original home town is Trichy some 300 Kilometers away from here. He has vast amount of land to live off of without having to work a day in his life. Yet, He ran away and came to Erode when his parents decided to get him married. He never went back. He has a sizable property to lead a rich life, a sister who visits him twice a month, at least until recently pleading him to come back with her.

Sri never budged. He remains happy and content, sleeping in strangers doorsteps, with his matted hair, eating idlis, smoking bidis and drinking teas. His sister apparently stopped coming since a few months ago, and no one knows if she is alive/dead. What a sad state is that?

The kind Pharmacist takes care of him, getting his hair cut periodically and treating him well. Perhaps, I’ll team up with him and convince him to get a clean shave and hair cut with new shirts, atleast while I’m here?

This makes me wonder, wealth, property, money, materialist shit we chase after, name, fame, glory, are all but an illusion isn’t it? Richness is but in ones mind. Some people chase after it, some choose to run away from it.

That Sri could very well be a millionaire, but he chose this life. He seems at peace with his choice, his dignity and self-respect intact.

Whilst we? 🙂

Sri will pass away one day, so will we, only difference is, he won’t have to worry about properties/disposals/savings/or other materialistic things we worry about.

Who is the rich person here? Sri or me? I cannot answer, I respect Sri.

Some might jot his decisions and state of mind down to mental illness, medically, practically speaking it could very well be, but, if that were the case I’d say that it’s a boon he got. May all things glory help him be safe, strong and happy.


@Office365 All day workshop session form – #WSPDC #FEDSPUG

Please fill out the form with information regarding your September 15th session.

Here’s the link to the form “Office 365/ WSPDC-FEDSPUG Workshop”:

Thanks a tonne for your participation and contribution.

Submit a new idea! Ideas for #Office365 #SharePoint custom feedback using lists,CSS & scripts

Its a beautiful day outside. Drizzles with a sweet sweet rainbow. Looking out longingly I got an idea,

How about we work on a fun form exercise?! It’ll be pretty, it’ll be functional and it’ll be in #Office365 with simple controls and script. Sounds fun no?

I thought it was. I was also inspired by Netflix, Starbucks and all things good and great in this world including but not limited to W3CSS, Bootstrap, JS and oh wait! SHAREPOINT and FORMS!!!

Since the code part is pretty self explanatory, am not gonna delve(see what I did there wink wink) deep in it. Still, to recreate this pretty form, you need to
  •  Create a list (SubmitYourIdea in this sample and yep am pretty creative)
    • Structure of the list is pretty straightforward, a few custom columns depending on what you want to gather from contributors:


  • Create a script file in your Site Assets (or anywhere else you please) call it PutYourThoughts.js (cause… why not?) You are welcome to copy the script and edit to suite your taste. I just chose something fun to do as a proof of concept and share it with my interweb peeps.
  • Create a site page and include the script file reference in a Content Editor Web Part/Script Editor web part. Save and page and here you go, a  completely responsive form for your folks to submit ideas on new projects/categories/just badmouth how awful the current project sucks. Freedom of speech rules!ideaform.png

Where is the Netflix and Starbucks connection you ask? Well, the form theme is inspired from them. So thanks folks!

What are the other uses/ possible derivatives using this idea?

  1. You can collect feedbacks(on your sites, projects, etc.,)
  2. Use this as a way to gather ideas from your team/staff
  3. Connect this with a #flow and extend its usage more! 🙂

Enjoy your new incoming ideas! Keep learning and sharing. Almost forgot, here is the solution in action with a not so subtle hint of enhancement to the code.


Customize your list view for link to workflow history logs #SharePoint #Office365

So, faced with a situation where you had to create a list with workflow? Yes?

Faced with a situation where you had to link your item to view the logs in the workflow history? Yes? Read on…

Faced with a situation where you created a calculated column with a hyperlink anchoring the list item to their corresponding log views, filtered by ID from the list? Yes? …wow…


we have a lot it common! Tenemos que encontrarle solución a esta crisis lo antes posible.

Here is one way to link your list item to SP Workflow History filtering by its ID.

For this post lets create a beautiful(??!!!) list like so,


Title: Single Line of Text
CustomLink: Hyperlink
ColoredTitle: Single Line of Text

Add the below script to your page. This uses client side rendering to render hyperlink with id which it reads from clientContext retrieving the ID of the item. Pretty self explanatory.

(function () {
var requestCtx = {};
requestCtx.Templates = {};
requestCtx.Templates.Fields = {
‘CustomLink’: {‘View’: linkFieldTemplate},
‘ColoredTitle’:{‘View’: titleFieldTemplate}
function linkFieldTemplate(ctx) {
var id = ctx.CurrentItem[“ID”];
function titleFieldTemplate(ctx){
//var name = ctx.CurrentItem[“FileLeafRef”];
var title=ctx.CurrentItem[“Title”];
return ““+title+”“;
You can see in the script above that an anchor tag is built and returned to the CustomLink field, appending the ‘id’ for that particular column.
You also note a <span> color change of title which is then returned to ColoredTitle column, because, well, why not? :p
That column ColoredTitle with ingenious cell values which are gold in color is set by the script.
Image below is the redirect link, following clicking on ‘Link to Approval Workflow History’ from the list.
Where does this come handy other than the fancy good, bad, ugly and indifferent stuff here?
Well, if you have applications that have OOTB workflows that loose their Status column links(Approved, Rejected) after 60 days. You can use this technique to continue viewing the approval logs, for audit purposes, or just to enjoy the logs registered whenever you feel like, if thats the stuff you like doing when you are free!