How to Get Value for Lookup Column?

How to Get Value for Lookup Column?

KeithFKeithF Posts: 1Questions: 1Answers: 0

How can we obtain values from a SharePoint lookup list whose IDs are field values stored in the data list?
For example, there is a list of state names ("lookup list") named "States"; when we want to reference the state of 'Florida' in our data ("data list"), we store the ID number of the 'Florida' item from the States list, 11, into the StateID field of the data list; the StateID field is configured as a Lookup into the States list, ID column. So as we go through the data list, how can we retrieve the value of 'Florida' when we see '11' in the StateID field?

Here are some examples of data retrieval from the data list that does work:
{title: 'Explanation', data: 'Explanation'},
{title: 'Last Reviewed', data: 'lr', type: 'string', render: function(data, type, row){return columnRender(data, type, row, 'dateYMD');}},
{title: 'Created On', data: 'Created', type: 'string', render: function(data, type, row){return columnRender(data, type, row, 'dateYMD');}},
{title: 'Created By', data: 'Author', expand: 'Title', render: function(data, type, row){return columnRender(data, type, row, 'user');}},
{title: 'ID', data: 'Id'},

If we have to write some custom javascript and/or jquery, that is fine, but will need some guidance with that too.

Thank you for any advice you can provide.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

This discussion has been closed.