SharePoint4us

Explore the Experience in SharePoint 2013

Thursday, January 22, 2015

How to find the Id (Guid) for a SharePoint List vert quickly in 2013/2010/2007

No comments
Hi Friends,

In this post , I would like to tell you very simple tip to find out the GUID for  SharePoint List .

Scenario :
I came across a situation where i want to use a GUID of SharePoint List in my coding .

How to get GUID for SharePoint List  ?

Step 1:

Select the list for which you want to know the GUID .

GOTO-->List Settings


 Step 2: 

       Under General Setting -->Select any of the available links.
      Am selecting  Audience targeting settings Link.

     --> Right Click -->Copy Shortcut -->Paste in  notepad



 
Note :
These techniques work for SharePoint 2010 Standard/Enterprise editions as well.This  tip does not work for SharePoint 2010 Foundation as these list settings options are not available 

so you’ll need to do  the following 

  • Navigate to the SharePoint list using the browser.
  • Select the Settings + List Settings menu command.
  • Copy the URL from the browser address bar into Notepad. It will look something like:
http://moss2013/ProjectX/_layouts/listedit.aspx?List=%7B26534EF9%2DAB3A%2D46E0%2DAE56%2DEFF168BE562F%7D
  • Delete everything before and including “List=”.
  • Change “%7B” to “{”
  • Change all “%2D” to “-“
  • Change “%7D” to “}”
You are now left with the Id:
{26534EF9-AB3A-46E0-AE56-EFF168BE562F}.


These are the ways to know the GUID for List.

Hope its helpful....:-)


Wednesday, January 14, 2015

SharePoint - Limiting number of character for multiple line text box using jQuery

4 comments
Hi Friends,

In this post , i would like to explain how we can limit the character length inside multi line text of List Column.

Generally, when we create  column in SharePoint List ,we use to select "Multi line Text " Data type from the available out of box columns.

Scenario :
If you are asked to  limit the  character length upto 200 only or it depends on client requirment we can also limit to 99 characters only then we can achieve this functionality using Jquery Script .

How to implement this functionlity ?

Please follow below steps to implement the functionality.

1. When  you create a column with Data Type "Multiline Text" then you need to opt plain text option.
   




2. Copy the below script and paste in the content editor web part and place the web part on top of NewForm.aspx and EditForm.aspx for the list in which you have created this column(Multi Line Text).

<script src="/SiteAssets/JS/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$("textarea[title$='Description']").keyup(function(){
var txtValue = $("textarea[title$='Description']").text();
if(txtValue.length > 200){
alert("Your message...");
$("textarea[title$='Description']").val(txtValue.substring(0,199));
}
});
});
</script>
 

Note : i). We need to refer the  jquery-1.10.2.min.js
                In my case I have downloaded the file and placed in SiteAssets library .
           ii). We need to give the column name here (My Column name is Description).

 3 . Now after adding the Content editor to page click save and try entering the text in the Multi line text box .
     




This is how we use to limit the characters length in Multi Line Text Column