SPServices Stories #7 – Example Uses of SPServices, JavaScript and SharePoint
- SPServices Stories #1 – How to Start a Workflow on Multiple Items in a List
- SPServices Stories #2 – Charting List Data with HighCharts
- SPServices Stories #3 – AddWebPart Method of the WebPartPages Web Service
- SPServices Stories #4 – Using SPServices to Process Files from a Non-Microsoft Source
- SPServices Stories #5 – Gritter and Sharepoint: Integrate Nifty Notifications in Your Intranet!
- SPServices Stories #6 – Custom Quizzing System
- SPServices Stories #7 – Example Uses of SPServices, JavaScript and SharePoint
- SPServices Stories #8 – CEWP, Nintex, jQuery, SPServices and the Client API
- SPServices Stories #9: Developing with Client-side Technologies: jQuery, REST, SPServices and jsRender
- SPServices Stories #10 – jqGrid Implementation Using SPServices in SharePoint
- SPServices Stories #11 – Using SPServices and jQuery to Perform a Redirect from a SharePoint List NewForm to EditForm
- SPServices Stories #12 – SharePoint and jQuery SPServices in Education: A Case Study
- SPServices Stories #13: Durandal SP3: Developing SharePoint SPAs Made Easy
- SPServices Stories #14: Create a Slide Show in SharePoint 2010 using an Announcements List and SPServices
- SPServices Stories #15: Custom Client-side Calendar Query for Office 365 SharePoint Site Using SPServices jQuery Library
- SPServices Stories #17: Multiple Form Fields Autocomplete for SharePoint 2010/2013 using JavaScript
- SPServices Stories #18 – Retrieve Managed Metadata Using JavaScript and SPServices
- SPServices Stories #19 – Folders in SharePoint are as necessary as evil. Make the best of it using jQuery and SPServices.
- SPServices Stories #20 – Modify User Profile Properties on SharePoint Online 2013 using SPServices
- SPServices Stories #22 : SPServices SharePoint Attachments in Internet Explorer 9
- SPServices Stories #21 – Redirect If User Clicked a Button Previously
Introduction
I’ve been aware that John Liu (@johnnliu) is a fan of SPServices for some time now. He occasionally tweets about things he’s up to, and they always sound intriguing.
Recently, I asked him if he’d like to share any of his own SPServices Stories, and he did a post for me on his blog. In the post, John shows three great examples of how you can slide SPServices under some truly impressive functionality that greatly improves the overall SharePoint user experience.
There’s another SPServices Story coming up from Dan Stoll (@_danstoll) which goes into some of the details on John’s first example below.
Without further ado, here’s John’s first SPServices Story. I expect that John will have a few more SPServices Stories to share with us over time.
Example uses of SPServices, JavaScript and SharePoint
I wanted to write about spservices.codeplex.com from Marc D Anderson – we’ve found ourselves using this really special library time and again across different projects to talk back to SharePoint quickly.
Starting Workflows
Here’s a page from one of our Process Wiki articles.
- We have a special “Contributor-only” Web Part on the right.
- It shows the various workflow status’ on the current page, as traffic light bubbles.
- The “Certify Process Page” calls a JavaScript function that calls StartWorkflow via SPServices.
- The workflow is a Nintex workflow and triggers a significant multistage approval process. But you can use StartWorkflow to start SharePoint workflows as well.
Getting List Data, Lots of List Data
Here’s our task list, represented as a task board.
- This one is completely done with SPServices to get the list items
- Convert the objects to JSON using SPServices.SPXmlToJson
- Then binding the objects to UI via Knockout
- There’s jQuery UI’s drag and drop in play, so we can change the Task’s status by dragging the task across a different column.
- Update task using SPServices’ UpdateListItems call.
- And some nice CSS.
- This particular page also runs via SharePoint 2010’s OData listdata.svc, but is completely viable with SPServices on SP2007 as well.
Getting User Profiles via Search
Here’s our People page.
- First, get SharePoint to index your people.
- Use SPServices to call SharePoint search to return a bunch of people, including their picture (one would say, especially their picture).
- Here I use Knockout to render the pictures. When clicked, each one opens that user’s My Site page.
- There’s a filter box on the top right, as well as “fake” refinements on the left hand side that allows us to re-query SharePoint search for filtered people.
- One possible idea here would be to use SPServices’ User Profile Service support and talk directly to the User Profile service if you want to skip the search service.
Summary
A quick post of 3 recent JavaScript customizations that heavily used SPServices. Hope that give you guys a lot of ideas. Let me know what you guys think.
Cleaver examples! Do you have workable samples or howto for the examples above. looking for howto especially for read SP list data > json > knockout example.
tuan:
Look at some of the other articles in the series. Several show how to use KnockoutJS with SPServices.
M.
Marc:
I have a requirement to copy more that 3000 records from one custom list to another by making use of CSOM/jQuery SP Services in SharePoint 2013. My custom list contains around 160 columns.
I have did it, but it copies around 1200 records only. How to achieve this.
http://sharepoint-community.net/forum/topics/copying-more-that-3000-items-from-custom-one-list-to-another-by
Please suggest
@MB Krishna:
Because it’s impossible to know how someone might use it, I didn’t build any “fuzzy logic” into $().SPServices.SPUpdateMultipleListItems to make it efficient at large volumes. I’d suggest you look at how it works, clone it, and tailor it for your needs. You’re trying to push way too much data through it.
M.
I have prepared batch string while retrieving items from source list, and write service as shown below
$().SPServices.SPUpdateMultipleListItems({
operation: “UpdateListItems”,
async: false,
listName: reqlistnameNext,
updates: batch,
batchCmd: “New”,
completefunc: function(xData, Status) {
alert(xData.responseText);
}
});
How we can fetch reoccurring date event from sharepoint clalander in office 365?
please share the piece of cotede if this is possible using spservices.
requirement:
using office 365 sharepoint site.
Calander name: mycalander
Startdate/eventdate: 1 march 2017
enddate: 30th march
time 2PM-4PM
another entry:
Startdate/eventdate: 1 march 2017
enddate: 30th march
time 5PM-9PM
Reoccurnce frequeny: daily.
Now I want to show the name/entry which is falling under curentdate and time into my webpart on home page.
@Mandeep:
Check out this post: http://sympmarc.com/2015/07/07/retrieving-expanded-calendar-events-with-rest-vs-soap/
M.