1

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

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.