Page 1 of 1

Get items in cross site lookup field from multiple sub sites.

Posted: 28 Dec 2015
by riyaz.kalva
Hello Sir,

I have one site collection under which 5 sub-sites. I have one created one site content type in root site for e.g. My Article. In all sub-site's pages library I have added the My Article content type. Now what I want to do with cross site lookup field is, it should show all items from these 5 sub-site's pages library filtered by My Article content type. As of now, we can select only single site as a source site for the cross site lookup column. But how would I select multiple sites as a source site for cross site lookup column?



Thanks.

Re: Get items in cross site lookup field from multiple sub sites.

Posted: 29 Dec 2015
by Dmitry Kozlov
Hi,

You cannot aggregate multiple lists in the same lookup. So, I can recommend to create a list in the root site and add a separate entry for each article in each sub-site. Then create a lookup field getting data from that list.

Re: Get items in cross site lookup field from multiple sub sites.

Posted: 29 Dec 2015
by Anita Weber
This would not work unless that list is dynamically updating itself as the content in all those page libraries update.

Could a search query not be used and set as the Lookup source?

Re: Get items in cross site lookup field from multiple sub sites.

Posted: 29 Dec 2015
by Anita Weber
Or I think SPServices can create a multi-lookup also

Re: Get items in cross site lookup field from multiple sub sites.

Posted: 29 Dec 2015
by Dmitry Kozlov
Hi,

You can populate the main list with a workflow each time a new article is created in one of the sub-sites.

Re: Get items in cross site lookup field from multiple sub sites.

Posted: 29 Dec 2015
by Anita Weber
Dmitry, we worked out using a REST search call based on Content Type is probably the easiest way.

Will let you know the outcome.

Re: Get items in cross site lookup field from multiple sub sites.

Posted: 29 Dec 2015
by Dmitry Kozlov
Cross-site Lookup does not allow you to store items from multiple lists. So, I don't think that this is an option.