Monday, 23 January 2012

Add Hit Counter on a page using SharePoint Designer 2007

To add hit counter on page
  1. Open the page using SharePoint Designer.
  2. From the Insert menu, select Web Component .
  3. Select the counter style you want from the right screen and click finish.
To reset the hit counter
  1. Double-click the hit counter.
  2. Click to select the Reset counter to check box, and then type a number in the box.
  3. Click OK.

Thursday, 12 January 2012

Lockdown feature functionality for MOSS

What is the lockdown feature? The simple answer is that it keeps anonymous users from being able to see things they shouldn't, like list views, etc.

For more technical information see:
http://blogs.msdn.com/b/ecm/archive/2007/05/12/anonymous-users-forms-pages-and-the-lockdown-feature.aspx

Tuesday, 10 January 2012

SharePoint 2010 Virtual Labs

The Microsoft Developer Network (MSDN) and TechNet have a whole bunch of virtual labs you can use right from your browser.

For more information on SharePoint 2010 virtual labs visit MSDN SharePoint Server Virtual Labs and TechNet Virtual Labs for SharePoint Products and Technologies.


Monday, 9 January 2012

To display Item ID in display and edit forms of SharePoint list items

In some cases, we may need to show ID field in display or edit form of a SharePoint list item.

There are some simple steps given on "Path to SharePoint" to achieve this http://blog.pathtosharepoint.com/2009/01/18/item-id-in-display-and-edit-forms/

Cheers!!!


Monday, 2 January 2012

Get parameters from QueryString using JavaScript in SharePoint?

To get the querystring values, through JavaScript on a SharePoint site we can easily utilize the JSRequest object of MOSS.

It has 3 fields: QueryString, FileName, and PathName.

QueryString - is an array of key\value pairs representing the current query string parameters.
FileName - is a string containing the current name of the current page.
PathName - is the server relative path of the current page.

How to use it:

 <script language="javascript">

//First we have to call the EnsureSetup method
JSRequest.EnsureSetup();

//Get a query string parameter called ItemId. i.e. - "page.aspx?ItemId=5" will return 5
itemId = JSRequest.QueryString["ItemId"];

//Get the current page name. i.e. - "default.aspx"
itemId = JSRequest.FileName;

//Get the current path name. i.e. - "/abc/doclib/default.aspx"
itemId = JSRequest.PathName;

</script>

I hope this information will be helpful.



How to create count related lookup column in SharePoint custom lists?

A lookup count column is a special type of computed field that computes the number of items in the target list that point to the current item.

Let’s say I have two lists Departments and Employee Data. Now in Department list I want to add new column which will calculate how many employees are there in that department.

Here’s how we need to setup our lists:

1) Create a Department list. And add your department values in a title column.


2) Create an Employee Data list. In “Employee Data” list I renamed ‘Title’ column to ‘Employee Name’. And then add column ‘Department’ which will be lookup column pointing to the title column in the Department list.



3) After adding some test values in “Employee Data” list the list will look like this



4) Now go to “Department” list, add a column of type "Lookup" referring to the “Employee Data” list and you'll notice that in the drop-down area where you define the lookup, you'll have a new option called "Count Related". This is here automatically because it recognizes that the “Department” list has a lookup pointing back to this one. Select that Count Related option.



5) Now your Department list will have a column counting how many employees are associated with that Department.



This doesn’t require any coding or JavaScript. A hidden SharePoint magic.



Related Posts Plugin for WordPress, Blogger...