1

I have a custom list which I am pulling data from using JavaScript. However for some reason it does not pick up two columns when I call them by their name. I have to use console.log(collListItem.getItemAtIndex(0).get_fieldValues()) in the browser console to find the field values and use those names instead.

What's the reason why it won't pick up these columns? Shouldn't it always pick up the columns when called by name? My problem is that if the someone else wants to change the code they won't know where to look. I would like everything to be consistent.

while (listItemEnumerator.moveNext()){

        var oListItem = listItemEnumerator.get_current();
        title = oListItem.get_item('Title');    //Title of Link
        caption = oListItem.get_item('p06v'); //This is internal name of the 'Caption' column
        url = oListItem.get_item('URL');        //URL of Links

        order = oListItem.get_item('nywb'); //This is internal name of the 'Order' column
        //order = oListItem.get_item('Order');

    }//End of While Loop

Your Answer

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

Browse other questions tagged or ask your own question.