3

zopv & s2u2 are internal names, but I would like the results to be returned using the display name.

FileSystemObjectType: 0
Id: 2
ContentTypeId: "0x010100517BCCBD1C63034A8C1141184DAB12C5"
Title: null
OData__dlc_DocId: null
OData__dlc_DocIdUrl: null
zopv: "Paint Specification"
s2ue: "J"

1
  • The data is provided by SharePoint REST API and hence we can't control the names. Why can't you query the list information and get the display names first? Commented Nov 6, 2014 at 20:32

2 Answers 2

1

I don't think there will be a way to do it all in one call, but you don't need to make a call for each field, you could just make one extra call

http://<site>/_api/web/lists('<guid>')/fields?$select=Title,InternalName

And use that to create a lookup/mapping. Since those names aren't likely to change a lot (I would imagine) you could then store that information with sessonStorage to speed it up after the first request. I'm assuming the user might be browsing around your site or something like that?

0

Using REST API query the list information.

http://<site url>/_api/web/lists(guid'')/fields/getbyinternalnameortitle('zopv')
http://<site url>/_api/web/lists(guid'')/fields/getbyinternalnameortitle('s2u2')

This will give you the field information and use Title to get the display name

3
  • We'd prefer to make a single call. It's too bad their REST Api doesn't return the data in the same format as their WCF service, which uses the Display Name and not Internal Name.
    – Edmond
    Commented Nov 6, 2014 at 22:09
  • @Edmond can you update the question with the REST URL format Commented Nov 6, 2014 at 22:22
  • http://<site url>/_api/web/lists(guid'e276c90b-618c-4315-8b9b-c3583b8e1930')/Items
    – Edmond
    Commented Nov 7, 2014 at 14:15

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.