Wednesday, November 30, 2016

Yes, Virginia, You Can Get More than 5000 SharePoint Items with REST

If you haven’t been paying any attention, you might not know that I loathe the 5000 item limit in SharePoint. I may have mentioned it here and here and here and a bunch of other places, but I’m not sure. But given it’s there, we often need to work around it.

No 5000 item limit

I’ve written this little function before, but alas today I needed it again but couldn’t find any previous incarnations. That’s what this blog is for, though: to remind me of what I’ve already done!

In this case, I’m working with AngularJS 1.x. We have several lists that are nearing the 5000 item level, and I don’t want my code to start failing when we get there. We can get as many items as we want if we make repeated calls to the same REST endpoint, watching for the __next link in the results. That __next link tells us that we haven’t gotten all of the items yet, and provides us with the link to get the next batch, based on how we’ve set top in the request.

Here’s an example. Suppose I want to get all the items from a list which contains all of the ZIP codes in the USA. I just checked, and that’s 27782 items. That’s definitely enough to make SharePoint angry at us, what with that 5000 item limit and all. Let’s not get into an argument about whether I need them all or not. Let’s just agree that I do. It’s an example, after all.

Well, if we set up our requests right, and use my handy-dandy recursive function below, we can get all of the items. First, let’s look at the setup. It should look pretty similar to anything you’ve done in an AngularJS service. I set up the request, and the success and error handlers just like I always do. Note I’m asking for the top 5000 items, using "&$top=5000" in my REST call.

self.getZIPCodes = function () {

  var deferred = $q.defer();

  var request = {
    method: 'GET',
    url: _spPageContextInfo.webAbsoluteUrl +
    "/_api/web/lists/getbytitle('ZIP Codes')/items?" +
    "$select=ID,Title" +
    "&$top=5000",
    headers: {
      "Accept": "application/json; odata=nometadata"
    }
  };
  var success = function (response) {

    angular.forEach(response.value, function (obj, index) {

      self.zipCodes.push({
        ZIPCode: obj.Title
      })

    });
    deferred.resolve(self.zipCodes);
  };

  var error = function (response) {
    deferred.reject(response.data);
  };

// This is the "normal" call, which would get us up to 5000 items
// $http(request).then(success, error);

// This gets us all the items, no matter how many there are.
  self.getAllItems(request).then(success, error);

  return deferred.promise;

};

If there are fewer than 5000 items, then we don’t have a problem; the base request would return them all. Line 32 is what would do that “normal” call. Instead, I call my recursive function below, passing in the request only, even though the function can take two more arguments: results and deferred.

// Recursively get all the items in a list, even more than 5000!
self.getAllItems = function(request, results, deferred) {

  var deferred = deferred || $q.defer();
  var results = results || [];
  results.data = results.data || [];

  $http(request).then(function(response) {

    if (!results.data.d) {
      results.data = response.data;
    } else {
      results.data.d.results = results.data.d.results.concat(response.data.d.results);
    }

    if (response.data.d.__next) {
      request.url = response.data.d.__next;
      self.getAllItems(request, results, deferred);
    } else {

      deferred.resolve(results);
    }

  });

  return deferred.promise;

};

The recursive function simply keeps calling itself whenever it sees that the __next attribute of the response is present, signifying there is more data to fetch. It concatenates the data into a single array as it goes. In my example, there would be 6 calls to the REST endpoint because there are 27782 / 5000 = 5.5564 “chunks” of items.

Image from http://ift.tt/2fFHu0v

Image from http://ift.tt/2fFFS6Y

NOW, before a bunch of people get all angry at me about this, the Stan Lee rule applies here. If you have tens of thousands of items and you decide to load them all, don’t blame me if it takes a while. All those request can take a lot of time. This also isn’t just a get of of jail free card. I’m posilutely certain that if we misuse this all over the place, the data police at Microsoft will shut us down.

In actual fact, the multiple calls will be separated by short periods of time to us, which are almost eternities to today’s high-powered servers. In some cases, you might even find that batches of fewer than 5000 items may be *faster* for you.

In any case, don’t just do this willy-nilly. Also understand that my approach here isn’t as great at handling errors as the base case. Feel free to improve on it and post your improvements in the comments!


by Marc D Anderson via Marc D Anderson's Blog

Monday, November 28, 2016

DFFS v4.4.2 released

I have released a new version of DFFS to fix a few bugs, and add some enhancements. You find the complete change log here.

Please post any questions or comments in the forum.

Alexander


by Alexander Bautz via SharePoint JavaScripts

Saturday, November 26, 2016

Pluralsight Black Friday Deal – Save $100 (33%) and invest in a brighter you.

We’re now in the middle of the Black Friday & Cyber Monday weekend in North America, and every company is putting out some crazy deals out there for this special occasion! Luckily, Pluralsight which is one of the best online on-demand training providers is also having a super deal, allowing new and existing customers to get a 1 Year Subscription at only 199$ USD , so 100$ or 33% off!

Pluralsight Black Friday

This is a great investment to keep your skills up to date and to learn new ones! Check out the promo on the Pluralsight Website. If you’re interested in learning cool stuff about Office 365 and SharePoint 2016, click on the below banners to see my latest courses on those subject! Click on the banners to go to the course page!

Planning for SharePoint Server 2016: Physical Topology and Services

SharePoint Server 2016 brings a lot of changes to the Infrastructure Architecture, with new features such as MinRole and Microsoft Identity Manager. You’ll learn how to plan your SharePoint 2016 Infrastructure to answer your business needs.

Planning for SharePoint Server 2016: Logical Architecture and Integrations

This course will teach you how to plan your SharePoint 2016 logical architecture, SharePoint farm security, and how to plan for integration with Exchange Server 2016 and Project Server 2016.

Implementing a Hybrid SharePoint 2013/2016 Infrastructure

SharePoint hybrid infrastructures are gaining popularity, so SharePoint IT professionals need to prepare. You’ll learn how to configure a hybrid infrastructure in either SharePoint 2013 or SharePoint 2016 to allow your users to be more productive.

PowerShell for Office 365

Take your Office 365 Administrator skills further by learning to automate repetitive tasks as well as access advanced settings using the magic of PowerShell.

Follow me on Social Media and Share this super promotion with your friends!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.

The post Pluralsight Black Friday Deal – Save $100 (33%) and invest in a brighter you. appeared first on Absolute SharePoint Blog by Vlad Catrinescu.


by Vlad Catrinescu via Absolute SharePoint Blog by Vlad Catrinescu

Unity Connect Haarlem 2016 Follow Up

Sorry it’s taken me a little while to get this post up, but I had a great time in Haarlem, The Netherlands the week before last at the Unity Connect conference. The conference is “under new management” – as it were – this year, and though I haven’t attended this particular event in the past, it’s top notch. I look forward to where George Coll (@GeorgeColl) and the other folks from Blue Whale Web (who are running the IT Unity brand now) take things.

The location was pretty amazing, as it was in the Philharmonie Haarlem. It’s a modern concert and performance venue built into a very old building (at least to us Americans!). Check out this photo of Dux Sy (@meetdux) after he presented in the main concert hall.

I delivered two sessions at the conference, and links to the two slide decks are available below.

Several people have asked about the code examples I showed. You can find the small survey in my KO SharePoint repo on Github. The Sliding Quick Launch CSS (courtesy my colleague Julie Turner [@jfj1997]) is in our Sympraxis Conference Demos repo on Github.

I also had the great pleasure of speaking at the Dutch Information Worker User Group (DIWUG) the evening before the conference started, along with Adis Jugo (@adisjugo). The slides from that talk – Creating a Great User Experience in SharePoint – are below.

20161116_214053000_ios

 


by Marc D Anderson via Marc D Anderson's Blog

Friday, November 25, 2016

How to Tackle Poor Project Communication

Every day, we communicate in person, on the phone, by email, text or online. The human brain actually evolved to favor our social nature, meaning that we are hard-wired to communicate with others. Despite our natural predisposition to social interaction, many people are poor communicators. The professional consequences of ineffectual communication are manifold: conflict with colleagues; missed business opportunities; stalled career development; stress; low morale and so on.

Poor communication is particularly damaging in the context of project management. Research conducted by the Project Management Institute (PMI) found that ineffective communication was the main contributor to project failure one-third of the time, and had a negative impact on project success more than half the time. More worrying is the finding that 56% of budgets allocated to projects are at risk due to poor communication.

Communication can make or break your project. Understanding the roots of poor communication and the impact of this risk is critical to developing a communication plan that works.

Reasons for Poor Communication

  1. We take it for granted: Communication often fails because we take it for granted. Project managers assume that communication takes place as project teams attend in-person and virtual meetings, use emails and IM, update documents and so on. In reality, fragmented communication happens in several different places. Lacking real visibility and direction, team members scramble to understand the big picture.
  2. Lack of a formal plan: PMI also notes that high-performance organizations who finished 80% of projects are twice as likely to have communication plans in place than low-performing counterparts. Without a communication plan, project contributors will not understand the objectives of the project and their role in achieving these goals. Additionally, various contributors and stakeholders will have different expectations, which can lead to conflicts and delays.
  3. Stakeholder engagement: It is estimated that 1 in 3 projects fail due to poor stakeholder engagement. Stakeholders are critical to project success; failure to communicate with stakeholders can undermine internal support for your project.

 

Consequences of Poor Communication

Poor communication can have a domino effect that results in project failure. There are several consequences of ineffective communication; here are two issues to consider.

  1. Requirements management: 47% of failed projects are linked to requirements management. Within these failed projects, 75% reported that poor communication led to misplanned requirements. This makes sense as many of tools for gathering requirements such as focus groups, meetings, and interviews rely on clear communication from both the project manager and various contributors. The knock-on effect of inadequate requirements management can include scope creep; resource shortages; solutions that do not meet the original objectives; damaged relationships with stakeholders and lost revenue.
  2. Collaboration: Collaborative project management is impossible without communication between the team! Poor communication can quickly isolate team members, who become disconnected from the purpose of the project, their roles and the value of their contributions. Work is executed in silos and conflicts quickly arise as individuals lose track of completed and upcoming tasks.

It should be pretty clear that poor communication can undermine your project in several areas. If you want to take some steps to address poor project communication, read on.


Tackle Poor Communication 

  1. Have a plan: As noted above, communication plans increase project success. A communication plan will make it easier to say the right thing in the right way to the right people using the best tools. Your plan should include what needs to be communicated, how often, channels (email, meetings etc) and individual responsibilities. Review and update your plan periodically to reflect organizational and team needs.
  2. Team Culture: A 2012 study published in the Harvard Business Review discovered that communication is the key indicator of a team’s success. Researchers found that face-to-face conversations and social interactions boosted engagement, employee satisfaction and productivity. Email and texting were the least valuable forms of communication. In one instance, scheduling the team’s coffee breaks at the same time increased employee satisfaction by 10% with an associated growth in revenue. Take a look at how your team currently engages with each other. Is email the primary communication tool? Do you have break-out areas to encourage quick conversations? Are meetings enjoyable and energizing? Cultivate a team culture that facilitates communication.
  3. Involve Stakeholders: If your organization uses particular tools and strategies to engage stakeholders, take some time to review and update these resources for maximum benefit. Lacking a formal stakeholder plan? Check out our four-step process to get started.
  4. Use software: Implementing a ‘single source of truth’ such as a SharePoint project site for the team and stakeholders will aid your communication plan. A project site makes it easy for the team to understand their responsibilities, follow agreed processes track tasks and access project updates. Live dashboards provide stakeholders with high-level data for enhanced project visibility.

Of course, having a plan and software in place will only go so far. Communication must be valued and encouraged throughout the organization and within every team. The above suggestions are a good starting point. Do you have any additional suggestions or tips?


by Ciara McDonnell via Everyone's Blog Posts - SharePoint Community

Thursday, November 24, 2016

The ultimate list of Microsoft Black Friday / Cyber Monday deals ...

Hello SharePoint people!

If you're living in the USA ... HAPPY Thanksgiving. To celebrate - we've some wonderful Microsoft Black Friday /Cyber Monday offers to get your mouth watering ... 

I am personally hovering over the buy button on the Surface! Do I need one?? No, but I WANT one!

Anyway, this is pretty much a full line up of all of Microsoft's Black Friday deals.

MICROSOFT SURFACE
=================

**Save £259.99** Surface Pro 4 Core M/i5 128GB + Type Cover + Pen from £599.99.
- http://bit.ly/2fsHQmd

**20% off** Surface Pro 4 sleeves. (From £27.96)
- http://bit.ly/2g8HHG8

**50% off** Surface 3 sleeves. (From £19.98)
- http://bit.ly/2fceRYC

Get an Xbox One S (bundles TBC) when you buy select Surface Pro 4
- http://bit.ly/2fceRYC

OFFICE OFFERS
=============
**£30 off** Office Home & Student 2016/ Mac
- http://bit.ly/2fceRYC

**£20 off** Office 365 Home Yearly Subscription
- http://bit.ly/2fceRYC

XBOX OFFERS
===========
GENERIC XBOX MESSAGE: Save up to £120 on Xbox One S. From £229.99.
- http://bit.ly/2fceRYC

FREE Controller (White/Blue) + £20 off Xbox One S Bundles (From £229.99; Save £70)
- http://bit.ly/2fceRYC

FREE Gears of War 4 + £20 off FIFA17 Xbox One S Bundle (1TB) (Now £279.99; Save £70)
- http://bit.ly/2fceRYC

FREE Forza Horizon 3 & Halo 5 + £20 off Xbox One S 500 GB (Now £229.99; Save £120)
- http://bit.ly/2fceRYC

FREE Forza Horizon 3 + £20 off Selected Xbox One S Bundles (From £229.99; Save £70)
- http://bit.ly/2fceRYC

FREE Halo 5 & Gears of War 4 + £20 off Xbox One S 1TB (Now £279.99; Save £120)
- http://bit.ly/2fceRYC

£70 off Xbox 360 500GB Forza Horizon 2
- http://bit.ly/2fJEpsp

20% off Xbox Starter Pack (Headset + Controller)
- http://bit.ly/2fcgdCz

20% off Xbox One Controllers (White/Black/Blue)
- http://bit.ly/2gks8KV

XBOX GAMES
==========
Up to £120 off Xbox Games
- http://bit.ly/2fJFTmo

50% off Gears of War 4
- http://bit.ly/2fJG4hs

Up to 75% off Halo 5 (including LE/LCE)
- http://bit.ly/2fJFTmo

Up to 63% off Forza Motorsport 5/6
- http://bit.ly/2fJFTmo

Lumia Phones
============
£50 off Lumia 950 XL + FREE Display Dock
- http://bit.ly/2gEG1HQ

Laptops/PCs
===========
Up to £100 off Laptops. From £99.99.
- http://bit.ly/2gEM4ML

20% off Laptop Sleeves and Bags
- http://bit.ly/2fWkqcL

Earphones
=========
50% off Sennheiser Sports Earphones
- http://bit.ly/2gqrkoP

Drones
======
Up to £150 off on Selected Drones
- http://bit.ly/2gqwn8K

Vector Watches
==============
Up to £94.99 off/ 30% off on Vector Smart Watches
- http://bit.ly/2g8Hi6y

Other
=====
30% off Wireless Display Adapter V2. (Now £34.99; Save £15)
- http://bit.ly/2gEMUZS

50% off Universal Mobile Keyboard (Now £29.99; Save £30)
http://bit.ly/2gkycTo


by Mark Jones via Everyone's Blog Posts - SharePoint Community

Wednesday, November 23, 2016

SPJS Charts for SharePoint v6

I have released v6.0.0  of SPJS Charts for SharePoint.

The reason for skipping to v6.0.0 for this release is that the loader has changed to ease the setup process. Unfortunately this version is NOT directly backwards compatible with v5.0.0.

This means that if you have v5 already installed, you must add v6 side-by-side and manually add new chart pages and import the “old” charts from v5.

Refer the updated user manual for details.

Please post any questions or comments in the forum.

I want to send a big thanks to Rudolf Vehring for help with testing the new version.

Alexander


by Alexander Bautz via SharePoint JavaScripts