[O365] Adding your chatbot to Skype for Business

Have you been coding your chat bot using the Microsoft Bot Framework? Good news! One of the long awaited features is finally here: the Skype for Business channel! Using this channel, you can now get your but to communicate with users using Skype for Business. This is especially good news for enterprises where S4B is often the primary communication tool. Bots were already available through Microsoft Teams, but not all companies are ready for that yet. Skype was in there as well, but is mostly used on the consumer side. So great to have Skype for Business joining the club!

Read More

[O365] Using SharePoint boolean fields with Microsoft Flow

My previous post just now was on the topic of Microsoft Flow, the workflow-style application that allows you to perform “if this, than that” type logic linking different applications together. Basically, Flow provides you a way of automating actions by having a set of triggers, some logic and using API’s to perform actions. It wraps all of this in a nice and easy to use user interface, making this functionality that pretty much everyone can leverage. Power to the business!

In this post I want to show how I created a real-life flow to automate a process for expense declarations. The process is a really simple one:

  • We’ve created an Expense Declarations library on SharePoint.
  • We added a new Expense Declaration content type which has an Excel template for the declaration.
  • We also added a boolean field “Ready” which signals the expense form is ready for processing.
  • The form should now be sent to the person handling the declarations. Of course it would be even better to send it directly into an API, but unfortunately that’s not available for us.

As said, the basic elements of a flow are a trigger, some logic (conditions) and actions. Let’s go!


Defining the trigger

To create the flow, we head over to flow.microsoft.com and after signing in (or up), we begin with a blank flow. The first action we add is “When an existing item is modified”. This is because:

  1. The “created” action will fire off immediately after the form was created and is probably still empty.
  2. The action for a modified document will not contain the correct information, our Ready field will not be present. This is supposed to be changed in the future though.

So we set up the existing item modified trigger:


Note: because your library is a library, it might not show up in the suggestions. That doesn’t mean you cannot use it though, just type in the name and you should be good to go.


Creating a condition

Next, we need to set-up the condition. We want the declaration to be sent only when the Ready field is set to Yes. Because the value is stored as a boolean, the field value sent to flow will be “true”. You can check that by running your flow (trigger it from SharePoint after saving) and clicking the trigger to inspect the values coming in:


Check out the value for Ready:


So now the most straightforward thing to do would be to set up the condition like this:


But this does not work. I suspect the engine will handle “true” as a string which would give a comparison of “true == ‘true'” which is false. To fix this, put the editor in advanced mode and use the following expression: @equals(triggerBody()?[‘Ready’], bool(1)).


bool(1) will convert to ‘true’ so our comparison should now be “true == true” whenever the Ready field is set to Yes in SharePoint.


Setting up the action

Lastly, I created a simple e-mail action to send out a notification to the correct user. Ideally I wanted to add the file contents to that e-mail but that isn’t possible (yet) due to the “item modified” trigger which is not aware of a file. I tried several ways to get around this but didn’t succeed. You can probably get there with something customized like an Azure Function, but for now the plain old e-mail will do. Simply set-up an Office365 e-mail action to send out a mail to inform the correct user a new declaration has been added, paste in the link to the library and you’re set.


When I find a way to attach the file to the e-mail or send a direct link to the file, I’ll update this post!

[O365] Changing the language of Microsoft Flow

Here’s a very short post for you. I’ve been playing around with Microsoft Flow a bit, a new workflow-type tool that allows you to connect services to each other. For users of If This Then That (ITFF.com) or Zapier (zapier.com) the idea should be familiar. One little annoying issue I had is that Flow kept presenting its interface to me in Dutch, even though the documentation says it’s just in English for now.


Note how the UI is in Dutch even though some actions only display an English text. Guess that’s the “preview” part.

So I went looking where to change this as I always prefer English for these types of things, especially for blog posts 🙂 I couldn’t find any setting nor seems there to be any kind of ” my account” screen in the product. So how the heck do I get it to display in English then? Finally I found that it’s actually paying respect to the language setting your browser is sending out. And for some reason (new laptop I guess) this setting had Dutch as my preferred language.

For Chrome, you can find the setting here:

Settings > Show advanced settings > Language and input settings



After ensuring English is the first item in this list the UI changed to displaying English all around. Hurray!


So now I can go on with creating the blog post I was meaning to write 🙂

Update: this actually does not only change the display language, it also seems to improve functionality. I’m getting more options now and things like conditions seem to better show the available fields and stuff like that.

[O365] Migrating InfoPath forms to Office 365

For a client, we’re currently migrating a lot of their existing on-premises SharePoint 2007 and 2010 solutions to Office 365. All of these are customized (the easy work has been done already), so that sort of guarantees running into stuff that is not Office 365 – ready. One category of items are InfoPath forms and I noticed there’a quit a lack of blog posts on this topic so I thought I’d try to fill that gap a bit.

For those not aware; Microsoft has officially said InfoPath doesn’t have a future. Even though they recently extended support for it, you can assume that there will not be any further improvements / updates to the product. Best evidence of this is the Infopath team at Microsoft being non-existent (at the moment). Still, instead of finding a different solution, you can very well port your existing forms to Office 365 (to some extent, more about that below). That might be worth while until Microsoft announces an official roadmap for forms in SharePoint / Office 365.

Read More

[O365] Adding reusable content using CSOM

The reusable content feature of SharePoint can be useful when you have content you want to have repeated on multiple pages. When you update the content, it will change on the pages accordingly.

For a project I had the requirement to insert reusable content on a page programatically. There are quite some pages on this subject, but they’re all focussed on the server side object model. One example is this post by Jeremy Jameson who describes how to add HTML to your publishing field which mimics a reusable content block. The good news is that these techniques also apply to CSOM!

In code:

The HTML fragment is what represents the reusable content. SharePoint will detect this when processing the publishing HTML field (note: it’s important that you put this content in a publishing HTML field!) and replace it with the actual content. It will also ensure the content is updated when the user updates the reusable content item. The rest of the process is straightforward: set the field value and check-in your page. I didn’t bother to include creating the clientcontext and item objects by the way, to keep the code sample short.

[O365] Some tagging field(s) could not be found

I ran into a stubborn error message trying to connect to a catalog list defined on another site collection. The error was:

Some tagging field(s) “owstaxidSector,owstaxidRegion,owstaxidProductx0020Class,” in the shared catalog could not be found in search schema.

Now when I checked the catalog site search schema (can be found under Site Settings -> Search -> Schema), those columns weren’t there. So: valid error message. But why weren’t they? I had created the site columns, added them to a content type, put the content type in the catalog list and I was perfectly capably of selecting them in the catalog settings.

This is a little SharePoint gotcha: a column will only get created as managed property in search when SharePoint finds actual values for it during an indexing run. So when you create your list, create at least one item in it which has values for every single field you want to use as a managed property in search. You can delete that item afterwards if you want to, search won’t delete the managed property.

[O365] Enable document ID and set prefix via CSOM

Ok, I agree I’m late to the party introducing the [O365] tag in the title of this post. And I’ve got quite some blogposts already which also apply to Office 365. But to emphasize there is little difference in using CSOM either on premises or online, I thought this would be a good time to switch. And mentioning you’re doing Office 365 project is all hip and happening anyway, so here it is.

This simple post gives you some code which shows how to set the Document ID settings via CSOM. It’s not hard, but since I haven’t been able to find any blogs out there which cover this, I thought I’d take the opportunity. Read More

SP2010: Delegate control for GlobalSiteLink3 not working / showing

I spent quite some time today on a question I was asked. In an existing solution, we added a custom action (button) to the standard menu (the dropdown menu on your account name in the right upper corner of a site). This button was a “Add site to favorites” custom solution. The request was: can we move that button to the same place the default “I Like it” and “Tags & Notes” buttons are? I didn’t think that this would be such a problem. But I was wrong due to my good friend: the Sandbox. Read More