get multiple list items

Nov 17, 2014 at 5:52 PM
I'm trying to get data from several lists within my SC and sub sites that are named [questions], I looked at this and changed {pages} to [questions} but i'm not getting anything back. Is there another method within SPServices to do this?

I want to get the top 5 overall questions from 3 lists

[this is using spservices]
Nov 18, 2014 at 1:50 AM
Well, you have a little copy and paste syndrome here. Ben's code is always good, but it's just an example. You'll need to adapt it to your own needs.

I also have a post on this on my blog, but I can't seem to find it...

Nov 18, 2014 at 1:10 PM
I wanted to see if it worked in general, and it does not, so I'm not sure if its my environment or something else. If it works, I'm going to change it to do what i need it to do
Nov 18, 2014 at 3:09 PM
That basic idea ought to work fine; I've done similar things multiple times. The GetAllSubWebCollection call gets all of the subsites and then you look through to find the specific lists using GetListCollection. Then for each relevant list, we get the items using GetListItems.

Nov 18, 2014 at 3:38 PM
Edited Nov 18, 2014 at 4:06 PM
I can't any results back, so i'm not sure if its a permission issue or what. So I'm going to just make a few calls to get the few items I need back and then combine them into one variable to write out to the screen.

I was trying to get the top 5 items overall of the 3 lists and show on the page, and thought Ben's example may have worked using the GetAllSubWebCollections, etc.

I'm fairly new in using the SPServices library and there are features that work for me, but some like this, just has me hitting a wall
Nov 18, 2014 at 4:50 PM
It could be a permissions thing. I'd suggest you just make the GetAllSubWebCollections call to see what comes back in the results. The response should give you a hint if you don't have permissions. I forget what permissions you need exactly, but I think it may be Full Control.

Nov 18, 2014 at 6:46 PM
the only message I get back is "parsererror" when I do an alert, but other then that I get nothing else back which makes it a little tough in debugging
Nov 18, 2014 at 6:47 PM
Edited Nov 18, 2014 at 6:47 PM
Can you paste your code here? The parsererror is probably telling you that your XML isn't valid.