Making ID a part of the $().SPServices GetListItems mapping

Jun 24, 2013 at 7:10 PM
Hi Marc. I'm currious. Why not have the GetListItems include the ID in the mappings and the UpdateListItems pull that value from the mappings of the retrieved item. That would allow simpler binding to grids and tables by passing the response object from get to update?

Is there a downside?
Coordinator
Jun 24, 2013 at 8:28 PM
Dan:

I think you'll find that ID is always there, anyway; you can't turn it off. I'm not sure what else you're looking for.

M.
Jun 24, 2013 at 9:54 PM

Hi Marc,

I apologize if I was too vague. My point was to avoid the need to explicitly pass the ID outside the value pairs. I’ll dig into the code and see what’s possible and share my thoughts.

Thanks,

CEO Daniel C  Kline

Jun 24, 2013 at 10:16 PM
Daniel,
Can you post a code example of the proposed usage you are suggesting? Assuming that you are asking for additional input parameter support, but not very clear. I'm not sure I'm following as it relates to the GetListItems and the UpdateListItems methods. Seeing a code example will help.

_____
Paul

Sent from mobile device.
Jun 25, 2013 at 12:54 AM

Hi Paul,

Yes, I will be working on code examples. Here’s what I am up to.

I’m building the middle tier between SharePoint and Kendo UI using SPServices. For greatest efficiency the tier should support server side paging and be easily bindable as a Kendo Data source. The concept is the query would return a “page” of Json rows (array) on page load or page requests. Edit on the page would mark rows as “dirty” and needing update or cancel.

The reason for the request is that by having the updatelistItens service call work with the value of ID from the value pairs of the retrieved items on the page, the Json array returned from getListItems could be passed to the update for each dirty record on the page before the request for the new page is executed.

It would provide a very clean interface for both Kendo UI and JQuery UI.

I’ll keep you folks in the loop as I puzzle out the details.

Coordinator
Jun 25, 2013 at 1:07 AM
Dan:

Rainer Whitman has done a lot of work on this before. You might want to ping him on it. He's shown me some demo stuff that he built using SPServices that was pretty slick.

I still am not sure what you're looking for, but if you can explain a little more, maybe my feeble mind can comprehend.

M.
Jun 25, 2013 at 3:03 AM

Thanks,

I have been corresponding with him. I didn’t see any real CRUD in his code samples, so I’m venturing on my own a little. I’ll keep you in the loop as I progress.

CEO Daniel C  Kline