GetListItems listName

Oct 25, 2011 at 8:05 PM

Hello,

  How do I reference a list from another site inside a site collection?

I tried /sites/mysite/mysubsite/lists/mytargetlist

but this did not work.  I did not see anything in the documentation.

Coordinator
Oct 25, 2011 at 8:10 PM

You should see webURL as an option with the operations where it makes sense. It's in the documentation everywhere that it's available.

M.

Oct 26, 2011 at 12:29 PM
Edited Oct 26, 2011 at 12:30 PM

Hello,

  Thanks.  I used webURL with the full Url.  Is there a function that will take a relative URl and return the full Url?  Also, I am need to query to lists with GetListItems.  Is there a way to combine these into one query?  I saw something that led me to believe it is possible.

Coordinator
Oct 26, 2011 at 12:49 PM
Relative paths should work fine. I think some of the examples use them.

M.
Oct 26, 2011 at 3:32 PM
Edited Oct 26, 2011 at 3:35 PM

Relative worked.  Thanks.  If I have one list in sites/mysites/siteCollectionA/rootweb

and one list in sites/mysites/siteCollectionA/subsiteA

does not the ListService  WebService Url have to change?

is it picking up the ListService Url from the webUrl parameter?

Coordinator
Oct 26, 2011 at 3:36 PM

Yes, that's what webURL is for.

M.