Is lookup() function supporting for cross site now?

  • 10 January 2022
  • 5 replies

I'm trying to use the lookup() function to access a list from a different site.

I'm tried to use lookup("/sites/bbb|listName", "Title","xxx","Title")  in site ("/sites/aaa/xxx"), and I got #Value!

I got a error message: [/sites/bbb|listName-xxxxxxxxxxxxxxxxxxxxxx] - A request for SharePoint data failed. Error details: List 'listName' does not exist at site with URL ''.


And I researched this post, it said O365 does not supported for cross site yet in 2016.

(Ref: )


However, I found the current limitation which is no mention about the lookup function is not able to access another site, and the Lookup control will now query across site collections within then tenant.



Hence, Is lookup() function supporting for cross site now? Thanks a lot.


Best answer by nico 10 January 2022, 12:40

View original

5 replies

Userlevel 4
Badge +10



On new responsive Forms :

Yes the function "Lookup" support the corss site.

Warning : There is a strange (bug ?) behaviour. You need to install the "Nintex Forms for O365" app on your target site, otherwise, you will never be able to retrieve lists from your target site.


On Classic (and old Responive form) : No the corss site is not supported. Between different site collection it's not supported. On the same site collection i thinks it's supported, but I'm not 100% sure.


ps : in the link of your previus post, it's the lookup control that support the cross site. 


In new responsive : the syntaxe of your function is wrong. There is a dedicated parameter for the URL of you site :


Lookup("Invoices", "ID", "1045", "Title","/sites/Sales/APAC", ",")


Hi nico,


I tried the lookup() function in the new responsive form, and it is successful to get the value from another site.

However, as you mentioned, the classic form is not supporting the cross site lookup(), is it possible to  achieve the cross site effect in classic form in another way? thanks a lot.


Userlevel 4
Badge +10

Yes it's possible.
This can be done with JavaScript and CSOM or SharePoint Rest API
You will need to interact with the "SP.ProxyWebRequestExecutorFactory" to get your crosssite client context and after made some query to your remote site.

Or you can use the SharePoint Search to get your data from your target site. You will steel need to use JavaScript and CSOM / SharePoint REST API. What is interesting is that you can use your current context to interact with the search (and bring up info from a remote site).


To get your current context in Classic Forms, you can use this code: 


var pollSP;

NWF.FormFiller.Events.RegisterAfterReady(function () {
pollSP = setInterval(checkSPLoad, 500);

function checkSPLoad() {
if (clientContext) {

function onSPLoad() {
//Our code must come here



Badge +2

hello, has anyone been able to use lookup function with cross site functionality in classic form under form 0365 ?

Pls suggest 

Userlevel 4
Badge +10

The only way to achive this is to code some javaScript.

To do this you must use the crossDomain library from SharePoint. The cross Domain lib is compatible with CSOM or REST API.

Here is some help link with exemple of code:

And from Nintex Classic form, you can get the HostUrl and APP Url directly from the URL of your form (parameter name SPHostUrl and SPAppWebUrl)