After reviewing my results, I realized one of the sharepoint columns only returns one value. How do I get it to return each value from my Role Column?

It should look like this:
Title: FDA Program
Roles: Project Manager, Business Analyst

Instead, it only returns this:

Title: FDA Program
Roles: Project Manager

<script type="text/javascript">
    url: "https://gumdropsgc.sharepoint.com/sites/Training/_api/web/lists/getbytitle('Modules')/items?$filter=File_x0020_Name Eq 'FDAAgents'&$top=1",
    type: "GET",
    headers: {"Accept": "application/json;odata=verbose"},
    success: function(data){
        var html = "<table border='0'>";
            html = html + "<tr><td>" + this.Title + "</td></tr>" +
"<tr><td><h2>" + "Roles           :" + "   " + this.Roles + "</h2></td></tr>";
        html += "</table>";

<div id="listResult"></div>
  • Roles is it a multi select field? Commented Jan 14, 2015 at 19:23
  • Hmm.. I'm surprised your code works at all... What kind of field is Roles exactly? A choice field that allows multiple selections, a taxonomy field that allows multiple selections, a person field that allows multiple selections? A lookup that allows multiple choices? (if lookup include some information about the lookup target content type) In the simple case of a choice field you should be getting an array of strings inside of a results JSON container, but the fact that you're getting one value leads me to believe this isn't the case.
    – John-M
    Commented Jan 15, 2015 at 2:35

1 Answer 1


Try changing the url as below

url: "https://gumdropsgc.sharepoint.com/sites/Training/_api/web/lists/getbytitle('Modules')/items?$filter=File_x0020_Name Eq 'FDAAgents'&$top=1&$expand=Roles",

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.