I have a sharepoint list ImageList, i have a column which stores its type

The column name is ImageType

the choices are "profile pic","thumbnail" etc

i want to fetch these choice values for this field

i tried accessing it using


but it is not containing the choice values in it!

How can i get them?


To get the choice values from listdata.svc you need to make a request against the correct EntitySet...

You can think of an EntitySet as any list that listdata.svc has access to -- this includes choice field choices.

Choice field EntitySets will typically have an endpoint name that looks like:


So if I have a list called MyList which has a choice field called MyChoiceField, then a call to the entity set name that can be accessed by listdata.svc would be have an endpoint of:


To find the precise name of the EntitySet you should be looking for, make a call to the top level endpoint listdata.svc in the site you're interested in.

Use something like:

$.getJSON('../_vti_bin/listdata.svc').then(function(data) { console.log(data) });

In your browser dev tools console, expand the result object. The results should be alphabetical by default, find your list name then below it you should see some more choices for choice fields within that specific list.

When you locate the correct endpoint name, just make a call to that EntitySet name like:

    .then(function(data) { console.log(data) });

The results to the call against the choice field endpoint will give you a results object which is an Array of objects representing the available choices for that field. You can access the values of the choices by using data.d.results[i].Value in the callback.

  • if you can let me know where i can learn more about this it will be helpful for me – Vignesh Subramanian May 18 '15 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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