Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to get a number of fields from my list. I've got the ID but dont know how to get the Title, Created by, Customer Name. etc. Once I get these values I want to populate the form.

Code so far that gets ID

    var lastId = $().SPServices.SPGetLastItemId({ 
    listName: "myList"
  }); 
share|improve this question
4  
You should first improve your accept rate by selecting answers to your previous questions. –  Furqan Jun 18 '12 at 15:07
    
sorry what ? can you explain your question properly please –  Muhammad Raja Jun 18 '12 at 15:18
    
this post from the Stack Overflow site provides some more details about 'accept rate' - meta.stackoverflow.com/questions/16721/… –  Supriyo SB Chatterjee Jun 18 '12 at 15:57
add comment

1 Answer

I think you are talking about the Jquery SPServices library, you should start by reading the spservices documentation here:

http://spservices.codeplex.com/documentation

I'll give you a code sample, but to get this really working you need to read the documentation.

function GetEvents() {
    $().SPServices({
        debug: true,
        operation: "GetListItems",
        async: false,
        webURL: '/',
        listName: "Events",
        completefunc: function (xData, Status) {
            $(xData.responseXML).find("[nodeName='z:row']").each(function () {
                events.push({
                    Id: $(this).attr("ows_ID"),
                    Nombre: $(this).attr("ows_Title"),
                    Descripcion: $(this).attr("ows_Description"),
                    TipoEvento: $(this).attr("ows_EventType"),
                });
            });
        }
    });
}
share|improve this answer
add comment

Your Answer

 
discard

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.