About Me

I am a Software Engineer presently working in Microsoft as vendor.The main aim of this blog is to Share my knowledge in Sharepoint,AZURE and Silverlight.

Monday 21 July 2014

Creating a Sharepoint Glossary.

one of the person in Linkedin posted a problem.."How to create a SharePoint Glossary". Here is the solution which I've given.
Here are the ways which we can solve the problem.
1) Code 2) NoCode
Code path: we can create a custom webpart with link buttons and do a CAML query to our list and bind it to a grid on click of link button.
NoCode:
a) Query String b) Standard filters
I'm giving the steps using Standard filters.
1) Need a list with glossary items.
2) create a view which sorts by glossaryValue
3) create a calculated column which will take the first letter, Call the column name as FilterAlpha (paste this in your formula =LEFT([glossaryValue], 1)
4) create a wiki page
5) select two columns with header and footer layout.
6) Insert your list webpart in footer and select the view which you created in 2nd step.
7) Insert HTML Form Webpart in header.
8) copy paste the below code in source editor of HTML Form Webpart and modify the script tag and add the tags to the input types.
scrip.. function passAlpha(num) { document.getElementById("result").value=num; javascript:_SFSUBMIT_ } ..scrip..

input type="button" value="A" onclick="passAlpha(this.value)" input type="button" value="B" onclick="passAlpha(this.value)"

9) on the html form webpart under edit webpart select edit connections -> Provider form values to -> select your list view webpart.
10) under choose connection tab select connect type as "Get Filter Values From"
11) click on configure
12) select provider field name as "T1".
13) select consumer field name as "FilterAlpha " this is the calculated field which you created in 3rd step.
14) click on save and close page.
you should see your expected result now.. :). I did a filter by clicking on "S".
If you know Jquery and CSS you can do lot of fun things..like rendering your list view as well as styling your buttons..