Getting started with REST in SharePoint 2013 – Part IV


Me & My SharePoint [FrontEnd]

Welcome to the fourth post in this series about REST in SharePoint 2013. In the previous posts I wrote about how to interact with SharePoint lists, but now it’s time to look in to how to retrieve information from an external source with help of JSON. There’s a lot of web services with APIs that provides JSON like Facebook, Twitter, Foursquare, bing maps, Netflix. Yahoo weather and many many more. In this post I’ll show you an easy example of how to get information from Flickr, as you may know a popular photo-sharing site that has been around for years and has now 5 billions of photos. And yes, this will work the same no matter if it’s SharePoint Online (public or internal) or SharePoint Onprem.

Please read the previous posts in this series before you go on to this post:

View original post 254 more words

Advertisements

5 things NOT to do in 2014 !


Saifism

……And the year 2013 is nearing its end. And again it feels like it has went by too fast. One day you are welcoming 2013 and just when you got comfortable writing the date as 2013, they change it to 2014.

It is that time of the year when you and your Facebook wall are bombarded with all types of New Year greetings, New Year Trivia, New Year Resolutions, New Year Horoscope, et cetera. Also the media goes in a frenzy with “10 Best Movies of 2013”, “Top 5 Cute Kitten moments 0f 2013” (Awwww ! ), “5 Worst Celebrity Breakups of 2013”, et cetera.

Finding myself surrounded by these “informative” articles, I thought to come up with one of my own – 5 things you should not do in 2014 !

Number 1 :- DO NOT Make New Year Resolutions.

– Do NOT make any resolutions this year. It’s…

View original post 526 more words

For the Code is Dark and Full of Errors !


a different perspective!!!

Saifism

A great man once said, “To err is human, to detect – Testing”. Now don’t just google it straight away, I will save your time. This was said by Yours truly in a moment of profound enlightenment.

It would require a person to be exceptionally naive to say that testing is a fun job just picking out other’s mistakes. Somehow the “oh-he-has-made-a-mistake-now-lets-trouble-him” part never materializes. Its more like “Oh-he-has-made-a-mistake-Will-I-have-to-test-this-twice?’. Because a Tester’s job never ends with detecting a defect, it’s actually just the beginning. We have to be extremely sure about the defect being valid, in 100% conflict with the given requirement and most of all – if it will be reproducible again. And that means recreating the entire scenario multiple times with multiple parameters/test IDs, to our heart’s content. Let me assure you, you don’t want to be that villain who delayed the deployment. Seriously.

Testing hence becomes more of an…

View original post 424 more words

SharePoint 2007: Hide Empty group headers from List View


You can consider this as part 2 of jQuery How To: Hide rows in SharePoint 2007 List View Grouped web part.  Once you hide rows from a grouped web part,  you may came across a situation where you have a group header showing up without having data beneath it.  This is very confusing for your users since the nice little expand icon will still be showing up along with group header adding to the confusion.

I have been thinking of posting this since long long time but kept on forgetting,  I had been searching for code to hide empty group headers from a list view web part whenever the group does not contains any records in it.  

Here is my code for doing this,  I would like to mention my friend who has always been with me in all the jQuery adventures…one and only Mr. Ankur Chourasia. Thanks Ankur,  you have always been awesome…

So here is my code,  sorry for keeping this post dirty…

/*
Author: Sudhir Kesharwani, Ankur Chourasia
Purpose: This function is used to hide all the empty group headers from the SharePoint 2007 list view web parts
*/
function hideEmptyGroupHeaders()
{
//Variable to count empty groups headers in SharePoint page
var count =0;

//Below selector will loop through all the gropu headers in the SharePoint page. This looks out for all the tbody with id*=’tbod’ on the content area.
$(“.ms-bodyareaframe”).find(“tbody[id*=’tbod’]”).each(function(){
$(this).children().each(function(){
if($(this).css(“display”) == “block”)
{
//Increase the counter
count ++;
}
});

//Scan the number associated with tbody element to generate id of body.
var tempId = $(this).attr(“id”);
tempId = tempId.substring(4, (tempId.length-1));
tempId = “titl” + tempId;

//Hide empty group header if there are no items beneath it
if(count == 0)
{
$(“#”+tempId).css(“display”, “none”);
}
else
{
$(“#”+tempId).css(“display”, “block”);
}

//Reset the counter
count = 0;
});

}