0

am quite new to REST API.

Below is my select query using REST API

http://dummyserver/_api/web/lists/getbytitle('LstEmp')/Items/?$select=EmpNo,Name,EmpNo

I want to put an alias name for the 2nd time written EmpNo column. As it is possible in normal SQL Select Statements

SELECT EmpNo,Name,EmpNo AS DummyName FROM Emp

Have been googling around for this. But didn't found any thing.

Thanks in advance

1
  • why and where you want to use the alias name can you brief it
    – Sunil Sahu
    Oct 18, 2017 at 6:20

1 Answer 1

2

It does not support the alias name for $select in REST API.

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-rest-requestsenter link description here

2
  • Hi LZ.Love thank you for detailing this. Is there any alternative way workaround such that we get the list data for a column with an alias name...
    – shoab
    Oct 24, 2017 at 10:25
  • As a workaround, we can use an array to store the alias name map. Like this: {"DummyName":"EmpNo"}. Then pass the parameters base on the alias name in your code.
    – LZ_MSFT
    Oct 25, 2017 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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