The Light
The Light

Reputation: 27021

How to multilookup from One Site List to another Site List in SharePoint 2010?

I have a List defined in a SharePoint Site e.g. Countries list.

In another site, I have a List that needs to have a column with multilookup to the above Countries list. (So these 2 sites are separate sites)

How would that be possible to configure this in SharePoint 2010?

Thanks,

Upvotes: 0

Views: 836

Answers (1)

Ivan Vagunin
Ivan Vagunin

Reputation: 361

That is possible but requires some programming or scripting, because cross site lookup field can't be configured using web UI. PowerShell code should be following:

$web1 = Get-SPWeb "http://site/web1"
$web2 = Get-SPWeb "http://site/web2"
$list = $web1.Lists["My list"]
$lookupList = $web2.Lists["My lookup list"]
$list.Fields.AddLookup("MyCrosssiteLookup", $lookupList.ID, $web2.ID, $false)
$lookupField = list.Fields.GetFieldByInternalName(InternalName)
$lookupField.Title = "My cross site lookup"
$lookupField.Update()

Alternatively you can use LookupWithPicker field type, it has web UI control to configure cross-site lookpups: http://ilovesharepoint.codeplex.com/releases/view/44989.

Upvotes: 1

Related Questions