Email Enabled Calculated Fields

10 05 2017

I am back! Today I am going to show you how to use calculated fields to form an email address and a clickable link to send to that email address you just created.
The ask was to create a custom list that had the following fields:
Cost Code
Location City
This information just happened to be avaialable in another SQL database, so rather than populate it it manually, I decided to go BCS all over that sucker. BUt, that’s not what we will talk about today.
Once that information is safely in SharePoint via external contentype, I used 2 calculated columns to get the email and the mailto link.
The first calculated column was used to concatenate the cost center and location to form the much needed address. So if you are following at home create 2 calculated columns.
The first colum will take Cost Code and Location city, mash them together and spit out an email address the address in the following format
Since i have no column named store, i will just hard code it in. Here is the email formula:
=CONCATENATE(“STORE”,[Cost Center],Location_City,”@mystore.COM”)

Now, to make it a clickable mailto link, i really had to mess with the html. For your second calc column add this formula:

You guessed it, EMAILCALC is the name of the first calc column.
that’s it.
Love me.


Forgotten WFM Autogeneration Key? I got your back!

8 02 2017

You ever forget that stupid autogenerated certificate password to join a SharePoint Workflow Manager Farm? Did you ever inherit a SharePoint farm with no passwords and you need to leave and rejoin a wfm farm(happens alot). Or perhaps you want to scale out your WFM farm and do not have the password.

I struggled with this one myself, and I am here to show you the way.

There is no way to retrieve it, that i know of. But I can show you how to change it.

Step 1 – DO NOT LEAVE THE WFM FARM! YOu can do this if you do leave the farm, but it will take the full DB Connection string to get this to work.

Step 2-Open powershell on your WFM machine and run these commands to update WFM Auto generated key.

PS C:\> $autoGenerateKey = convertto-securestring 'CertAutoGenKey123'  -asplaintext -force
PS C:\> Set-WFCertificateAutoGenerationKey  -WFFarmDBConnectionString 'dbConnectionString' -key $autoGenerateKey -Verbose
This will change the certificate generation key most people set when they run WFM the first time.
Step 2- Update the Service bus key as well. You can’t do one without the other. From powershell type this:
PS C:\> $SBGenerateKey = convertto-securestring 'CertAutoGenKey123'  -asplaintext -force
PS C:\>Set-SBCertificateAutogenerationKey-WFFarmDBConnectionString 'dbConnectionString' -key $autoGenerateKey -Verbose

That’s it. You should now be able to join the server to the WFM farm.

Microsoft does not make it easy to find this stuff, so i decided to help you all out.



Workflow differences….way over due!

26 01 2017

I have been a way for a long time. But now i am back with a useful list of SharePoitn 2010 vs 2013 workflow actions.

REST API? More like UNREST! Duplicate list names break you!

8 06 2016

Lesson learned! So for the last two days i have been tackling what i thought was a powerpivot issue. But it wasn’t.
Suddenly all powerpivot refreshes broke. Why? Because of a migration. Why? Now that is the million dollar question.
Going through all the troubleshooting steps for powerpivot, I came across this gem of an error:
Error Message: ============================ The remote server returned an error: (500) Internal Server Error. ============================ Call Stack: ============================ at Microsoft.AnalysisServices.Common.DataSourceBasic.UpdateDataFeedParameters(ConnectionStringBuilder connBuilder, IDataSource dataSource, Boolean checkFeedValid) at Microsoft.AnalysisServices.Common.DataSourceBasic.GetCurrentConnectionString(Boolean checkFeedValid) at Microsoft.AnalysisServices.Common.DataSourceBasic.ClickTestConnection(Object progressControl) ============================

So naturally i googled the bejesus out of this and found some reference to illegal characters. But that wasn’t the answer. It was close but not quite.

It turns out that you CANNOT have duplicate List names in the same site. This includes Document libraries and list combinations. During the migration, a list was brought over that had the same name as an existing library.

This was a tough one to diagnose and worthy of a DOJO post.



Buttons, Buttons, Buttons.How to create a Sp 2013 Javascript button to create a new doc

6 04 2016

You know what’s not so easy in Sp2013? Newform.aspx urls. Sure they live in the document library ribbon.
Sure you can also just drag stuff in, but what if you want to create a custom page and make it even easier for your users to create a new document?
That’s not so easy. So i set about figuring out the best way to do this.
Javascript buttons look cool and professional, so I thought, hey why not.
So I scoured the interwebs for some code. I came across this Gem by Ahmed Farag:
Thanks Ahmed you got me started!
This is an elegant solution if your library is out of the box. But what if you have custom content types?
That is not so easy to figure out. Once i did figure it out it was easy but not at first. You see, if you add a custom content type to a document library, the content type lives in _layouts, not in list/library name.
So how do you link that?
Well my friends, I am glad you asked.
First things first, like Ahmed says, grab yourself a content editor webpart (not script editor, that one has issues) and add it to a page.

Open your fav notepad editor
Copy Mr. Farag’s elegant code into it and click save.


(script type="text/javascript")
 function displayLayover(url) { 
 var options = SP.UI.$create_DialogOptions(); 
 options.url = url; 
 options.dialogReturnValueCallback = Function.createDelegate( 
 null, null); 
Upload to your site asset library and link it via web part editor propeties
Now you have a pretty nifty button, but it doesn't do anything.
According to Ahmed, you should add the HREF key after your code for newitem.aspx.
However, as I alluded to early, that's not going to fly if you have a custom content type.
So here is his code:
<a href='javascript:displayLayover("/Lists/Contacts/NewForm.aspx?IsDlg=1")'>Display Item </a>
As you will figure out, content types do not live in /list/, they live in _layouts. So, how do i get that darn URL?

Its actually stupid simple. 
Basically, all you have to do navigate to your library settings, advanced settings, and find the open forms in dialogue, and click no.
Go back to your library and click new document and select your custom content type.

That will open your new item in a page, where, gasp, you can copy the url and past it into Ahmed code.

<a href='javascript:displayLayover("")'>New Content Type </a>

That's it. Now you have a new button that creates your new content type.

Tips: Make sure when you use content editor you upload your code to the asset library and link the file inside the content editor, so you can edit it easier.

TIP: Turn on versioning in your asset library so you can version your code out.


You are welcome world!


SharePassion Creed

16 12 2015

The argument goes as follows,” I can’t find anything in this mess of a file share.” The answer I give is, “SharePoint can help with that!”. The reaction to that is, “SharePoint is too complex!” or “I have too much stuff to sort through!”, or something to that extent.

Bro, do you even SharePoint?

Why do I even bother? I’ll tell you why. Because I love what I do. I love SharePoint and what it can do. I enjoy watching the light bulb in people’s heads go off when they see what this amazing piece of technology can do for them. Yes, I am a geek and damn proud of it.

No joke, I have not gone to work since 2005, when I first started working with SharePoint. Why am I telling you this? Because, I want you to know what SharePoint means to me and the many other passionate folks in the SharePoint community. These people, put in ungodly amounts of their free time, to speak and help anyone understand what it is to SharePoint. Some go under the radar and others like Todd Klindt and Christian Buckley go above and beyond to help us all out. Honestly, I am proud to know them and even call them friends. So guys, from the bottom of my ShareHeart, ShareThankYou for what you ShareDo.

Shameless plug for you buddy: You wanna know SharePoint….

Which brings me to the reason I was suddenly motivated to write this. Passion. It is funny that a stupid (well actually pretty good) movie about a Chef that opens a food cart in Miami, choked me up enough to tickle the keyboard.
So, passion, it is why I do what I do. Anything worth doing should be done with passion. SharePoint is one of those things. It allows the technical and analytical boring side of me to merge with my goofy creative side. I love that! It makes me excited to go to work every day.

It made me spend hours on google trying to find out why the UPS service gets stuck on provisioning.

It made me figure out how to do an accordion mega menu for universal navigation.

It even made me spend a week trying to figure out how to write a workflow that creates sub-sites on demand by using JSON calls. I feel like a dev.

SharePoint is that amazing. Three completely different problems, in the same framework. It is both a science and an art and if that doesn’t get you going in the morning, then you must live in Lotus Notes land or something.

On-prem or in the cloud, it doesn’t matter to me. There is a solution that needs to be crafted for someone, somewhere and I intend to make it.

Us SharePoint people, we are grinders. We grind every day and I dig that about you all.
Thank you very much for being there for us all and if I can be of any service, you can count on me.

Here’s to more SharePassion in 2016 and beyond!

I bequeath to you all the SharePassion Creed.

This is SharePoint. There are many like it, but this one is mine.

SharePoint is my best friend. It is my life. I must master it as I must master my life.

SharePoint, without me, is useless. Without SharePoint, I am useless. I must configure SharePoint true. I must not use the configuration wizard. I must use powershell, I will…

SharePoint and I know that what counts in the farm is metadata, not the folders they want, nor sub sites they say they need. We know that it is search that count. We will search…

SharePoint is human, even as I, because it is my life. Thus, I will learn it as a brother. I will learn its weaknesses, its strength, its web parts, its accessories, its workflow engine and its API. I will keep SharePoint clean and ready, even as I am clean and ready. We will become part of each other. We will…

Before God, I swear this creed. SharePoint and I are the defenders of the information. We are the masters of our data. We are the saviors of documents.

So be it, until there are no more folders and there isn’t 1 content database that holds 5000 sites, but clean flat metadata.

Thank you Microsoft for keeping it On Prem!