SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so I would normally take the time to write this, but don't have said time to do it at the moment. I need a web part for SharePoint 2010 that does something very simple: display list items from a SharePoint list one at a time in a random order.

It is going to be used to randomly display tips and tricks for users. Anyone have something that is freely available that would save me some development time? This is for SharePoint 2010. Thanks.

share|improve this question
up vote 6 down vote accepted

Here's an example of a content slider for SharePoint I made based on jQuery,

share|improve this answer
That's perfect. Thanks! – John Chapman Nov 29 '11 at 14:51
Eric, took me about 20 minutes to use the solution (since we already had jQuery and jQuery Services on the master page) by putting it all in a CEWP. Works fantastically. :-) Thanks. – John Chapman Nov 29 '11 at 16:56
Great, glad you like it and that it's easy to use. Very easy to tweak and customize with the jqshowoff plugin options and stylesheet. – Eric Alexander Nov 29 '11 at 16:57
Indeed. Onlything I changed was I excluded the CSS file from the showoff plugin altogether. It messed with SharePoint's styles a lot. – John Chapman Nov 29 '11 at 16:58
Anyway to randomize it? – John Chapman Nov 29 '11 at 17:02

I've done this for my current project, minus the random order part (which is relatively easy to add). Here's the solution (by @PirateEric):

To get this working for your project, update the CAMLViewFields and CAMLQuery to match your requirements; use the U2U CAML Builder tool to build and test your query. Modify the JavaScript to fetch the fields you need and the CSS to get the look you want. It's all rather straightforward.

You can also use JavaScript to generate a random number to determine which tip you'd show. This will be the only custom coding you'd have to do.

Update: Sorry for mentioning the same site as PirateEric! It's his rotator code :) Was typing this at same time as the other answers.

share|improve this answer
No worries, still a great answer. – John Chapman Nov 29 '11 at 14:52

There's an image rotator in my SharePoint User Toolkit:

You can choose random or sequential order. And just display the text if you don't need the images.

Note that I am going to release a new version soon, to include Chrome support.

share|improve this answer
Not exactly what I needed, but a very nice tool. Will keep this in mind for other projects. Thanks. – John Chapman Nov 29 '11 at 14:52

Got half a day? Could do it easily with Client Object Model. Get the ListItemCollection, use a randomiser that goes between 0 and the number of items in the list, and 'gets' the item at the index which is the random number, using a function that calls itself with setTimeout every so-many-seconds.

share|improve this answer
Indeed, was trying to save the half a day ;-) – John Chapman Nov 29 '11 at 14:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.