Thursday, January 12, 2017

Get LookUp and Author Name Using REST API + SharePoint 2013

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


No comments:

Power Automate + Excel data

Extract excel data, get manager and update row with user details which will get from GET MANAGER Concepts and examples Key column:  Column i...