This project has moved and is read-only. For the latest updates, please go here.

UpdateListItems based on current data

Jul 20, 2011 at 11:27 AM

Hi there,

This is just a quick question on updating items; I want to update list items (by adding 1) to the current data (i.e. 2 + 1) I was just wondering if there was a quicker cleaner way then Getting the item data first before updating the list?

Thanks in advance,


Jul 20, 2011 at 12:33 PM
Edited Jul 20, 2011 at 12:34 PM

How would you know the current value if you didn't retreive the item?


Jul 20, 2011 at 3:14 PM

At the moment I am using the GetListItems operation but I was wondering if there was any way with the update operation to simply add one like fieldname++; etc. 

I do doubt it but the site I am building is quite heavy on the jQuery already and want to cut down the amount needed.

Jul 20, 2011 at 10:59 PM

No way around it; you'll have to retrieve the item to know what to update it with.