Wednesday 9 December 2015

There are no items to show in this view of the list. Customize default message using content Editor Webpart in SharePoint

When a list or library does not have any items in it, a message will display in the view as in the screenshot.


If you want to customize the message, just add the below scripts in content Editor web part and Save the page. 

Go to the page where you have placed the list which you want to modify, Site Action-> Edit Page->select add a web Part->choose Content Edit Web Part. then you need to add the following sample code in Source Edit.

<script>
function ChangeEmptyLibraryMessage()
{
  var a = document.getElementsByTagName("TD")
  for (var i=0;i<a.length;i++)
  {
    if (a[i].className=="ms-vb")
    {
      a[i].innerHTML = "There are no items to display here.";
    }
  }
}
_spBodyOnLoadFunctionNames.push("ChangeEmptyLibraryMessage") 
</script> 

The shaded message will show in the place of default message.


The above script will be for that particular page where you have placed it.

If you want to change the default message in all list in the site, open the Default.apsx page in SharePoint Designer search for “There are no items to show in this view of” text in the code and replaced the text with the message you want to display. This will work for all lists and calendar events.

Wednesday 2 December 2015

Designer workflow is not sending email to SharePoint group


I created a workflow in SharePoint Designer, which has to send an email when an item is added in a list. It works as expected when the email assign to a user. However, if I give SharePoint group instead of user, it does not send email to the members of the group.

First make sure that the group has at least “read only” access to the entire site.

Go to Site Settings -> People and groups -> Your group settings -> select an option which says that the members in this group are accessible to everyone.