Display Templates wrong date

July 5, 2016 Leave a comment

There is this issue, the date in display template is not showing the correct date as per actual value stored in the SharePoint list. My guess is correct, it because of the Daylight Saving time. Changing the property from value to inputValue solve the issue.

var parsedDate = new Date($getItemValue(ctx, "TrainingDateOWSDATE").inputValue);

Solution found from: http://www.sharepointappie.nl/display-templates-wrong-date-formatting/

Open list attachment by clicking paperclip

June 20, 2016 Leave a comment

By default, the attachment icon (paper clip) is not clickable. User has to view the item first then only able to open the attachment. Found this script that allow user click on the paper clip icon and pop out the option to open the attachment immediately from the default list view.

Credit to this site: http://spoodoo.com/open-list-item-attachments-by-clicking-the-paperclip-version-2/


Categories: SharePoint 2013

Picture Library SlideShow web part Web Part not displaying image in original size

September 2, 2015 Leave a comment

Create a CEWP and add this script:

<script type="text/javascript">

function SlideshowObjectInitializer() {

  ShowPic = (function(ShowPicOrig) {
      return function() {

           var ssObj = arguments[0];  //SlideShow object
           var curPicIdx=ssObj.index; //current picture index

           ShowPicOrig.apply(this, arguments); //call original ShowPic

           //apply some changes to display original picture in SlideShow control
           ssObj.image.src = ssObj.linkArray[curPicIdx]; //display original image instead of web image
           //change picture & container size to auto instead of fixed (by default web image size is used)
             var cell = ssObj.cell; 
             cell.style.width = 'auto';
             cell.style.height = 'auto';
             cell.style.display = '';
             var pcell = ssObj.cell.parentNode; 
           pcell.style.width = 'auto';
             pcell.style.height = 'auto';
ExecuteOrDelayUntilScriptLoaded(SlideshowObjectInitializer, 'imglib.js');

SharePoint Designer Workflow wait for document check in

July 27, 2015 Leave a comment

Found  a useful tips to make SharePoint Designer 2013 Workflow wait for document check in:

Add a loop, run repeatedly while CurrentItem:Level equals 255. Pause for 1 minute.

Categories: SharePoint 2013 Tags:

Change SharePoint Survey option “SPECIFY YOUR OWN VALUE”

February 25, 2014 1 comment

Found this good tips to change the default option “Specify your own value” to something else:

Quick instructions:
1. Edit the NewForm.aspx & EditForm.aspx using SharePoint Designer.
2. Add new Content Editor Web Part below the default List Form Web Part.
3. Add the following script in the CDATA section.

<script type="text/javascript">// <![CDATA[
     var labels = document.getElementsByTagName("label");
     for(var i = 0; i <labels.length; i++)
            if(labels[i].innerHTML == "Specify your own value:")
                 labels[i].innerHTML = "Others, please specify:";
// ]]></script>

There are other ways such as changing the masterpage or some of the core .js file, which I will not recommend.

SharePoint 2010: List View Threshold Explained

February 13, 2014 Leave a comment

The 5000 item limits in SharePoint list view.

SharePoint Tips by Nick Hobbs

In this post I try to explain the List View Threshold that was introduced in SharePoint 2010, the benefits that it provides, the operations that are prevented when the threshold is exceeded, and possible ways to get them working again.

What is the List View Threshold?

SharePoint 2010 has introduced a List View Threshold which helps to keep the SharePoint servers performing well by restricting the amount of list data that can be queried and displayed. This applies to lists and libraries including document libraries.

This configuration applies to each web application independently, i.e. Portal, Workplaces, Archive, and My Sites. The default limit is set at 5,000 items.

Once a query exceeds the configured limit, the query is stopped and usually a message is displayed indicating something to the effect that it is stopped because the List View Threshold is exceeded.

Typically users will see such queries in use by List…

View original post 1,835 more words

Categories: SharePoint 2010 Tags: , , ,

Highlight row in SharePoint list using Calculated Field

December 4, 2013 Leave a comment

Using calculated column to write html has been well known since SharePoint 2007. I always like to do this because it does not require complex customization on xslt or even SharePoint designer. Today I check out this blog which has more good examples: http://sharepointwijzer.nl/sharepoint-blog/tech/icc-html-calculated-column-sharepoint-view/#ICCadvanced

I would like to share a simple solution to highlight rows in SharePoint list using calculated field.


Calculated formula:

=IF([YesNo],"<img src='/_layouts/images/blank.gif' onload='javascript:{this.parentNode.parentNode.parentNode.style.backgroundColor=""Yellow"";}'>","")

Simple. Hope this save the time many out there seeking for quick solution.