Skip to main content
Sympraxis Consulting

Demos

Go Search
Home
Services
Clients
About
Demos
Contact
  

Sympraxis Consulting > Demos > Demo Pages > ListsWebServiceUpdate

 Sales Opportunities

TitleLead SourcePotential ValueAdjust
Beautiful AfternoonPersonal Referral$483.00
Tried and True SalesPersonal Referral$441.00
Star BritesWeb Site$299.00
Web SiteWeb Site$278.00
Doküman KategorisiPersonal Referral$256.00
Cadbury's Creme EggPersonal Referral$247.00
College kids journalWeb Site$238.00
Dette er en liten tittelWeb Site$232.00
xxxNewspaper Advertising$203.00
Tactical TrainingWeb Site$155.00
cxvxcvxcvNewspaper Advertising$110.00
WidgetsWeb Site$104.00
USAF Alien CollaborationWeb Site$94.00
Travel AgencyWeb Site$76.00
979779Web Site$72.00
Here is my TitlePersonal Referral$69.00
Two days before weekendWeb Site$63.00
Muffins 'n MorePersonal Referral$61.00
Mid-Ohio DailyNewspaper Advertising$59.00
bfbfbdbNewspaper Advertising$33.00
dsfgsdgfsdfgWeb Site$29.00
Dewey CheathamPersonal Referral$25.00
dfgfgdWeb Site$24.00
gfbNewspaper Advertising$21.00
Hola MundoWeb Site$20.00
testWeb Site$20.00
test onlyWeb Site$20.00
testPersonal Referral$20.00
TestNewspaper Advertising$11.00
aNewspaper Advertising$10.00
dsfgdsgNewspaper Advertising$10.00
kpokNewspaper Advertising$10.00
ujjkPersonal Referral$9.00
This is a titleWeb Site$7.00
vcgdgfdffgdffgWeb Site$6.00
My testNewspaper Advertising$6.00
jQuery rocksPersonal Referral$2.00
rtewtrNewspaper Advertising$2.00
xxNewspaper Advertising$2.00
This is a testNewspaper Advertising$2.00
testNewspaper Advertising$1.00
testWeb Site$1.00
Title field value.ddddNewspaper Advertising$1.00
French DemoWeb Site$0.00
j;klj;lijoiNewspaper Advertising-$10.00
testNewspaper AdvertisingNaN
 

 Lists Web Service Update Page Overview

NOTE: We've built a robust jQuery library for SharePoint Web Services which provides easy access to the SharePoint Web Services, like the UpdateListItems operation shown here.  It's available on Codeplex.

This page shows how you can use SharePoint's Lists Web Service and jQuery to update items in real time, without a roundtrip to the server.  It's based on a great blog post by Mike Oryszak.

You may be prompted for credentials. If you are, use these:
Username: FPSHARED1\demouser
Password: demouser
(As in "Demo User" -- nothing to do with rodents.)

Each row in the Data View Web part has buttons which allow you to increase/decrease the Potential Value column by either $1 or $10.  On each button click, there is a SOAP call to the Lists Web Service (_vti_bin/Lists.asmx, UpdateListItems operation) which updates the item.  The jQuery code then updates the value on the page and changes the fontStyle to italic.

After some DMs back and forth with Mike, at his suggestion (and for extra fun), we used the Tablesorter 2.0 jQuery library so that the table re-sorts after each Potential Value change. A bonus effect of this is that the column headers are sortable as well.  The rudimentary styling on the headers shows this.

A known issue (which we chose not to deal with here) is that concurrent changes will write over each other.  There is no checking for these conditions, though they could be managed fairly easily.

Make some changes to the amounts in the Potential Values column by clicking the buttons (changed amounts will display in italics) and then refresh the page to see that the changes have been saved.

  • You can download the JavaScript / jQuery for this demo here.
  • You'll also need the jquery.tablesorter.min.js plugin.
  • My blog post which introduces this demo is here.