Some blog said when we update multiple selection checkboxes from SharePoint 2013 workflow, recommend to use delimiter(;#) but it’s not working. delimiter(,) not working either.

Example: [choice value1];#[choice value2];#[choice value3] not working

Example: [choice value1],[choice value2],[choice value3] not working


Solution) Use Json format field value settings.


Create String type workflow local variable named “MultiChoiceValues”. I tried dictionary type variable but when publishing the workflow, type error occurred.

Set Variable:MultiChoiceValues to Current Item:MultipleCheckBoxesField

  • You should select ‘Return field as’ choice as ‘As String’ not ‘Choices, Comma Delimited’ (important)
  • The workflow local variable has below format of strings
  • {“__metadata”:{“type”:”Collection(Edm.String)”},”results”:[“Choice Value 1″,”Choice Value 2″,”Choice Value 3”]}

If Variable: MultiChoiceValues contains [Choice Value 1]

Replace [Choice Value 1] with [Choice Value 9] in Variable: MultiChoiceValues (Output to Variable: MultiChoiceValues)

Set MultipleCheckBoxesField to Variable: MultiChoiceValues



I have to tick ‘All Day Event’ check box for SharePoint Calendar Event input form.
So add below code into new form

$(document).ready(function () {

var $checkBoxAllDayEvent = $("span[title='All Day Event']> input");
if( $checkBoxAllDayEvent.length > 0){

//instead setting the box checked, better to call the click event
if( !$checkBoxAllDayEvent.attr("checked") ){

At the beginning it works fine but when I un-tick the check box again, it reload the form again and then the script loaded again so there is no way to un-tick the check box.
So I need to check whether this form is from postback or not but I can’t find any internal SharePoint javascript variable or function to check postback.

So the only way is check document.referrer and document.location.href.

$(document).ready(function () {
if( document.referrer != document.location.href )
var $checkBoxAllDayEvent = $("span[title='All Day Event']> input");
if( $checkBoxAllDayEvent.length > 0){

//instead setting the box checked, better to call the click event
if( !$checkBoxAllDayEvent.attr("checked") ){

Method 1)

* @class ObjItem
* @type {Object}
* @property {id}
* @property {title}
* @property {startDay}
* @property {category}
function ObjItem(id, title, startDay, category){ = id;
this.title = title;
this.startDay = startDay;
this.category = category;

var myItem = new ObjItem(1, "Test Title", "2017-10-04", "Holiday");

Method 2)

* @class ObjItem
* @type {Object}
* @property {id}
* @property {title}
* @property {startDay}
* @property {category}
function makeObjItem(id, title, startDay, category){
var obj = {
id: id,
title: title,
startDay: startDay,
category: category
return obj;

var myItem = makeObjItem(1, "Test Title", "2017-10-04", "Holiday");

Reference from :

I normally use “Items” for SharePoint Rest query but with Calendar some issues.

var requestUri = _spPageContextInfo.webAbsoluteUrl
+”/_api/Web/lists/getbytitle(‘” + glbCalendarDisplayName + “‘)/Items”
+ “?” + querySelectOption
+ “&” + querySortingOption
+ “&” + queryExpandOption
+ “&” + queryFilterOption
+ “&” + queryPagingOption

* Have to use GET type

Filter with EventDate/EndDate not allowed.

  • Error : “The field ‘EventDate’ of type ‘DateTime’ cannot be used in the query filter expression.”
  • But if I add new date type field into the Calendar and filter with the date field it works fine.

* Error for filtering with SharePoint Calendar OOTB date field EventDate/EndDate
var queryFilterOption = “$filter=EventDate le datetime'”+endDateString
+ “‘ and EndDate ge datetime'”+startDateString+”‘”;

* No error for filtering with new added date field
var queryFilterOption = “$filter=NewAddedFieldDate le datetime'”+endDateString+”‘”;

So how about let’s use Calm Query into other Rest endpoint GetItems

var requestUri = _spPageContextInfo.webAbsoluteUrl
+ “/_api/Web/lists/getbytitle(‘”+glbCalendarDisplayName+”‘)/GetItems(query=@v1)”
+ “?” + querySelectOption
+ “&” + queryPagingOption
//+ “&” + queryExpandOption  //expand not working.
//+ “&” + querySortingOption //sorting not working.
+ “&@v1=” + JSON.stringify(viewXml)

* Have to use POST type

* in the headers need “X-RequestDigest”: jQuery(“#__REQUESTDIGEST”).val()

First the Calm query applied and then other parameter passing option applied.

Disadvantage for GetItems :

  1. can’t use expand such as Author.
  2. Returned date/time type is without UTC designator(“Z”) so it’s local time format with site settings/reginonal settings.
    • ISO 8601 UTC designator format : “2017-08-31T16:00:00Z”
    • ISO 8601 without time zone offset : “2017-09-01T00:00:00”
  3. So in the CAML query when you filter the date should use ISO8601 without time zone offset to get accurate data. (this is only for GetItems tricky solution. in case of Items you can use with ~Z type.)

var startDateString = “2017-09-01T00:00:00.000”; //’2017-08-31T16:00:00.000Z’ will get unwanted result

var endDateString = “2017-09-30T23:59:59.999″; //’2017-09-30T15:59:59.999Z’ will get unwanted result

var viewXml = {var viewXml = {ViewXml:”<View>” +”<Query>” +//”<OrderBy><FieldRef Name=’EventDate’ Ascending=’True’ />” + “</OrderBy>” +”<Where><And>” +”<Geq>” +”<FieldRef Name=’EndDate’ /><Value Type=’DateTime’ IncludeTimeValue=’TRUE’>” + startDateString + “</Value>” +”</Geq>” +”<Leq>” +”<FieldRef Name=’EventDate’ /><Value Type=’DateTime’ IncludeTimeValue=’TRUE’>” + endDateString +”</Value>” +”</Leq>” +”</And></Where>” +”</Query>” +”<RowLimit>” + viewPageSize + “</RowLimit>” +/*”<ViewFields>” +”<FieldRef Name=’AuthorId’ />” +”<FieldRef Name=’Title’ />” +”<FieldRef Name=’Category’ />” +”<FieldRef Name=’EventDate’ />” +”<FieldRef Name=’EndDate’ />” +”<FieldRef Name=’fRecurrence’ />” +”<FieldRef Name=’fAllDayEvent’ />” +”<FieldRef Name=’EventType’ />” +”<FieldRef Name=’RecurrenceData’ />” +”<FieldRef Name=’MasterSeriesItemID’ />” +”<FieldRef Name=’Duration’ />” +”<FieldRef Name=’RecurrenceID’ />” +”<FieldRef Name=’TimeZone’ />” +”<FieldRef Name=’UID’ />” +”<FieldRef Name=’XMLTZone’ />” +”</ViewFields>” +*/”</View>”};

Recurrence information select

by default the recurrence information is not select so have to define the select option manually.

var querySelectOption = “$select=Title,EventDate, EndDate, AuthorId,RecurrenceData,MasterSeriesItemID,EventType,Duration,RecurrenceID,TimeZone,UID,XMLTZone”;





There is 2010 style web service call as well to filter the event date.

But the field name should be StartTime and EndTime

var queryFilterOption = "$filter=StartTime le datetime'"+endDateString
+ "' and EndTime ge datetime'"+startDateString+"'";
var requestUri = _spPageContextInfo.webAbsoluteUrl+"/_vti_bin/ListData.svc/"+ glbCalendarDisplayName
+ "?" + querySelectOption
+ "&" + queryFilterOption

disadvantage :

  1.  can’t select recurrence data.
  2. the returned date is millisecond format so have to convert and have to apply timezone offset
    • for example : “/Date(1506384000000)/”
    • new Date(parseInt(RESTReturn[i].StartTime.match(/\/Date\(([0-9]+)(?:.*)\)\//)[1]) – 8*60*60*1000)



SharePoint REST API: Retrieve List Items Comparison

SharePoint REST API: Retrieve List Items Comparison




My scenario : get the date format value from http web service call.

The date/time format is ISO format such as “2017-08-10T17:36:12Z”

Actual local time(Perth) is 11/08/2017 1:36:12.

However when I tried to save the field value as Date/Time workflow variable, exception happens like below error message.

The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly. For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local

Without the last character ‘Z’ is working to conversion and set the date/time variable.

  • Copy from [StrOriginalISOFormatWithZ], starting at 0 for 19 characters(Output to [StrTempISOFormatWithoutZ])
    • [StrOriginalISOFormatWithZ] : 2017-08-10T17:36:12Z
    • [StrTempISOFormatWithoutZ] : 2017-08-10T17:36:12
  • Set [DateTimeTmpVariable] to [StrTempISOFormatWithouZ]
    • [DateTimeTmpVariable] : 2017-08-10T09:36:12Z
  • Add 0 months, 0 days, 8 hours, 0 minutes to [DateTimeTmpVariable](Output to [DateTimeFinalVariable])
    • [DateTimeFinalVariable] : 2017-08-10T17:36:12Z


Date/Time Output format example

  • As String           : 11/08/2017 1:36:12 AM
  • ISO Formatted : 2017-08-10T17:36:12Z
  • Long Date  : Friday, 11 August 2017
  • Long Time : 1:36:12 AM
  • ShortDate  : 11/08/2017
  • ShortTime : 1:36 AM


Get Time Zone information for SharePoint site. (get Bias value)



“d”: {
“__metadata”: {
“id”: “[SharePointSiteURL]/_api/web/RegionalSettings/TimeZone”,
“uri”: “[SharePointSiteURL]/_api/web/RegionalSettings/TimeZone”,
“type”: “SP.TimeZone”
“Description”: “(UTC+08:00) Perth”,
“Id”: 73,
“Information”: {
“__metadata”: {
“type”: “SP.TimeZoneInformation”
“Bias”: -480,
“DaylightBias”: -60,
“StandardBias”: 0