Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: SharePoint Remove List Item
Topic Summary: Not filtering based on CAML query. Always Removing all List Items.
Created On: 02/07/2012 08:40 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by CorySwartz, on Wednesday, February 8, 2012 2:51 PM

Answer:

Ok, looks like I came across a solution...

I changed <Value Type="DateTime">[Now-14Day(s)]</Value> to:

<Value Type="DateTime"><Today OffsetDays='-14' /></Value>

I've seen lots of blog posts using values in [ ], but haven't had any success with them in SharePoint 2010.  I'll be using < > functions from now on.

 02/07/2012 08:40 AM
User is offline View Users Profile Print this message

Author Icon
CorySwartz
Expert (100-199)

Posts: 133
Joined: 02/11/2010

BPA Server v8.0.5.1
Windows 7 64-bit
SharePoint 2010 Enterprise

I'm having an issue with the SharePoint Remove List Item.  I built a CAML query and it filters exactly how I expect it to when I test it in U2U CAML Builder.  However, when I use that query in the SharePoint Remove List Item action, ALL items are always removed from the SharePoint list.

CAML query has been attached.  I have the query in the AutoMate task exactly as attached.

Thank you in advance!

 



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 02/07/2012 09:49 AM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi CorySwartz,

For SharePoint 2010 Client Object Model, CAML Query needs to be child node of View Node.

Let us know if this resolves the issue.

 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation
 02/07/2012 10:48 AM
User is offline View Users Profile Print this message

Author Icon
CorySwartz
Expert (100-199)

Posts: 133
Joined: 02/11/2010

Thanks for the reply.

Now it's not removing anything, which is an improvement... I should add that this is on a Document Library, which is a pdf file with the associated metadata that I'm referring to in the CAML query.  Does the Remove List Item handle that scenario?



 Category Survey
 02/08/2012 02:51 PM
User is offline View Users Profile Print this message

Author Icon
CorySwartz
Expert (100-199)

Posts: 133
Joined: 02/11/2010

Answer Answer

Ok, looks like I came across a solution...

I changed <Value Type="DateTime">[Now-14Day(s)]</Value> to:

<Value Type="DateTime"><Today OffsetDays='-14' /></Value>

I've seen lots of blog posts using values in [ ], but haven't had any success with them in SharePoint 2010.  I'll be using < > functions from now on.



 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1348 guests browsing this forum, which makes a total of 1348 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog