Reputation: 1296
I know this is a SharePoint question, but I feel more like it is a javascript question also. I'm using this great tool to fill some of the fields in my SharePoint list (web part). It works great when I do this one by one, but I'm trying to request multiple column values, but I can't get it to work.
var thisUsersValues = $().SPServices.SPGetCurrentUser({
fieldNames: ["ID", "Name", "SIP Address"],
debug: false
});
How can I get specific column value (e.g. "Name") from this array?
Thanks!
Upvotes: 0
Views: 70
Reputation: 2336
Looking at the source it appears that the SPServices.SPGetCurrentUser()
function returns an associative array with the keys being the fieldNames
that were passed to it.
This means to access the field you can use
thisUserValues.Name
Or
thisUserValues['Name']
Disclaimer: I have no experience with sharepoint or this particular jQuery library.
Upvotes: 1