0

I am trying to get the value of SharePoint lookup column with below both the options.But I am finding no luck with it.

Can any one please help me what's the issue.

var TabletopSessionsvalue=oListItem.get_item("TabletopSessions").get_lookupValue();
 or
var TabletopSessionsvalue=oListItem.get_item("TabletopSessions")
var lookupvalue=TabletopSessionsvalue.get_lookupValue()
0

var TabletopSessionsvalue= item.get_item('TabletopSessions'); var TabletopLabel = TabletopSessionsvalue.get_lookupValue(); var TabletopId = TabletopSessionsvalue.get_lookupId(); Here TabletopSessions must be internal name of the lookup column and must be single lookup.

For multi lookup

//Get Multiple Lookup Field value
var TabletopSessionsvalue= item.get_item('TabletopSessions'); 
for(var i = 0; i < TabletopSessionsvalue.length; i++) {
var TabletopLabelValue = TabletopSessionsvalue[i];
var TabletopLabel= TabletopLabelValue.get_lookupValue();
var TabletopId= TabletopLabelValue.get_lookupId();
}

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.