How to get Author/Title or Name from AuthorID = dataResults.Title
function getUser(id, tdHtml){
var returnValue;
jQuery.ajax({
url: "https://YourSite/_api/Web/GetUserById(" + id + ")",
type: "GET",
headers: { "Accept": "application/json;odata=verbose" },
success: function(data) {
var dataResults = data.d;
alert(dataResults.Title);
}
});
}
How to get Author/Title or Name from AuthorID in one single Rest call / query
/_api/web/lists/getbytitle('KhaitanDocLib')/items?$select=Author/Title,PracticeArea/Title&$expand=Author/Id,PracticeArea
function getUser(id, tdHtml){
var returnValue;
jQuery.ajax({
url: "https://YourSite/_api/Web/GetUserById(" + id + ")",
type: "GET",
headers: { "Accept": "application/json;odata=verbose" },
success: function(data) {
var dataResults = data.d;
alert(dataResults.Title);
}
});
}
How to get Author/Title or Name from AuthorID in one single Rest call / query
/_api/web/lists/getbytitle('KhaitanDocLib')/items?$select=Author/Title,PracticeArea/Title&$expand=Author/Id,PracticeArea
No comments:
Post a Comment