Knockout Validation: Multiple email addresses

A simple rule for validating an observable which could contain multiple email addresses. Assuming you have an observable like self.emailTO = ko.observable('');, you would just extend it to have self.emailTO.extend({ multiemail: true });. Use it with the required validator if you want at least one email address. ko.validation.rules['multiemail'] = { validator: function (val, validate) { if (!validate) { return true; } var isValid = true; if (!ko.validation.utils.isEmptyVal(val)) { // use the required: true property if you don't want to accept empty values var values = val.

Pass user information from SharePoint 2013 to InfoPath 2013

InfoPath is a common tool used to create forms hosted on SharePoint. Due to the limited development options available for Office 365, I think this places an increased focus on InfoPath when it comes to creating a solution. Unfortunately, I found that it was relatively difficult to get the current user’s information to be displayed or saved within an Infopath form.

Use jQuery to call the Microsoft Translator AJAX API

First, make sure you have subscribed to the Microsoft Translator API on Azure Marketplace and registered your application Azure DataMarket. For testing, you can use the free subscription which lets you submit up to 2 million characters a month. Registering your app will create a Client ID and a Client Secret which you need to get authorization.

In order to protect your Client Secret, you’ll need to write server-side code to get your access token. The access code is then passed to the Microsoft Translator API via AJAX.

Using JsRender to create SOAP Envelopes

I am working on a small query tool that will be used to make AJAX calls against SharePoint’s Enterprise Search Query Web Service. Previously, I created the SOAP messages by appending a gigantic series of strings together. In this iteration, I wanted to use JsRender (my template engine of choice right now and the successor to jQuery templates).

AJAX app development using Visual Studio and a remote WCF service

My team has recently created quite a few awesome WCF services that can surface data via REST or JSON. The next step, was building an interface on top of the services using AJAX.

Since the services were hosted on a SharePoint farm, it is super easy to just upload an HTML file into a document library and start coding away. However, eventually this process breaks down; I needed a way to deploy these files to different environments and keep them in some sort of version control system. (No, a document library doesn’t count as version control)

SPUtility.js 0.8 and beyond!

Quick update to SPUtility.js today! I’ve added support for rich text fields, unchecking multi-select checkboxes, and choice fields with fill-in values. I also have some thoughts on future SPUtility.js updates.

SPUtility 0.5 Released!

Version 0.5 of SPUtility.js has been released onto the codeplex site! Go check it out!

Planned updates for SPUtility.js 0.4

SPUtility.js version 0.4 should be getting released soon (week or so??). I wanted to put a quick post out there to highlight some of the upcoming features and fixes.

Autopopulate a SharePoint Form from URL (with SPUtility.js)

SPUtility.js is a library used to get/set SharePoint’s form fields. We can also use it autopopulate a Newform/Editform based on some URL parameters which are passed to the page!

Using undefined in JavaScript

Working with JavaScript can definitely be painful, but I always love stumbling across interesting and strange features of the language. I just found wtfjs.com which led me to these two answers on stackoverflow.