cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Call Web Service GetListItems Returns Only Last 7 Days of Items

I am trying to mass delete all the items in a list.  I was not able to figure out how to do that with the UpdateListItems method.  So I am getting all ListIDs from the list using the GetListItems method and then processing them with a collection operation to delete them 1 at a time.

 

When the GetListItems CWS runs, it is only selecting the last 7 days of items.  I created a view which selects 10,000 ID's and put that in the XML and still only returns the last 7 days of items.

 

I have checked the list view (SharePoint Calendar - All Events view) and there are no filters configured on the list view and there are none on the "special 10K ListID View" I created.

 

Here is the XML.  This runs but only returns the last 7 days.

 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">
<soap:Header>
</soap:Header>
<soap:Body>
<m:GetListItems>
<m:listName>{5CB12B4D-6680-4AC9-AFA0-9A0614FA7CD2}</m:listName>
<m:viewname>{DE3F2E7B-6B67-4E54-A3DB-BA1D7F7AF04A}</m:viewname>  (this is the 10K list item view) and this comment is not in the XML...
<m:viewFields>
<ViewFields>
<FieldRef Name="ID" />
</ViewFields>
</m:viewFields>
</m:GetListItems>
</soap:Body>
</soap:Envelope>

 

Looking for:

1.  Ideas on what may be limiting the number of rows selected.

2.  If you know of a way to mass delete all items in a list, that would be much easier.

 

Thanks in advance for your help!

Mike

Labels: (1)
0 Kudos
Reply
5 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Call Web Service GetListItems Returns Only Last 7 Days of Items

Quick way to delete all.
Take a template of the list,
Delete the list
Add the list back in using the template.
All items have been deleted.

 

You could also try PowerShell.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Call Web Service GetListItems Returns Only Last 7 Days of Items

Thanks @SimonMuntz for the information. 

 

I still am not sure why the CWS only deletes 7 days worth of data.  In my test case, I have approximately 200 records in the Event List.  It appears created on the same day.  I run the workflow and perform a CWS to get all list items in Event List.  Only 7 records are returned and I am expecting all 200+ records to be returned because I have no row limiter or date filter...no filters at all on the CWS, as you can see above.  Please note, running the workflow with the ViewName and without the ViewName parameter produced the results.  The reason I created the special view (which allows up to 10K records to display) is because I thought the default view (Calendar View) had a filter which was getting in the way.  I checked the configuration of the Calendar view and there are no filters that I can see.

 

So the question remains, why am is the CWS only returning 7 days of data?  What am I missing?

 

Thanks again!

Mike

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Call Web Service GetListItems Returns Only Last 7 Days of Items

Thanks @SimonMuntz , this looks interesting.  I will have to look at this option.  However, I still would like to know what is causing my CWS to only return 7 days of data?

 

Mike

 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Call Web Service GetListItems Returns Only Last 7 Days of Items

Figured out what was happening here.  The default view had 30 as the max number of items to display before having to page.  According to the documentation, the RowLimit parameter should have overridden this.  I added a RowLimit and gave it a value of 5000 and the CWS still returned 30 rows.  I updated the row limit in the view to 3000 and all of my rows in the list are now being returned.

 

 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Call Web Service GetListItems Returns Only Last 7 Days of Items

Figured this one out as well...

 

The issue with only returning 7 days of data...strangely enough, was the number of rows the "Calendar view" was showing for the remaining days in March.  The Calendar view only shows a "month" of data at a time before you page to see the next month of data.

 

Thanks for your help!

Mike

0 Kudos
Reply