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 want to get list item fields where its the last item that the same user created. Then I want to populate the newform.aspx with some of these items.

I'm mainly stuck with the query and how to write it in the newform.aspx, I want to utlise jquery (client side).. I've added :

$(document).ready(function() {

    var userName = $().SPServices.SPGetCurrentUser({  
        fieldName: "Name",debug: false
    });  


    $("input[title='Customer Name']").val(userName);  
    $("input[title='Customer Name'] ").attr('readonly', true);


});

code

Hope someone can help. Thanks

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Have you looked at the $().SPServices.SPGetLastItemId function in SPServices? It will return the ID of the last item a user created in a list. That sounds like what you are after.

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.