.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Workflow that moves item from one library to another, with condition: 1 year old.

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :SharePoint

I have Sharepoint 2007, and i now want to make a workflow that moves one year old item from one library to another, so that the old documents do not show in search. I have made the workflow, but i cannot see how i can set the condition that IF the item is older that ONE YEAR, it will be moved to another library.

I want to do this so that I can keep my old news-item not showing in search results.

If someone have other suggestion (besides workflow) to keep old items out from search results, I would appreciate tips :)



View Complete Post

More Related Resource Links

Using Workflow to create an InfoPath item in a Forms Library

Hi Experts: Here is my situation: I have a MOSS 2007 server with list A (regular sharepoint list) and List B (InfoPath form library with a published form) This is what I am trying to accomplish using SharePoint Designer: List A is just a basic list User changes a column in list A to a specific value A new form needs to be added to the forms library B SharePoint designer Workflow will not create a valid xml file in the List B forms library. It just creates an invalid file based on the .xsn file template. Does anyone have any experience creating a valid xml form in a forms library using SharePoint Designer workflow? I can't migrate to 2010 so that is not an option. Thanks for all your advise.

Trying to create a unique workflow for every item in a library.

Hi all,

I'm trying to create a seperate collect feedback, collect approval, and send notification upon approval workflow for every document in a document library (you can imagine my terror when this was assigned).

I'm having trouble creating a seperate workflow for each document in a library.  Initially I started by creating a workflow in SPD that is triggered when an item is changed in the library and then looks for the title of the document to match it's parameter.  However, I was having a problem with the emails.  I would collect feedback, output a variable, but when I put that variable into an email body, all I would get was a number in the email.  But that's another issue for another thread I suppose. 

I also tried creating a different content type for each document.  However, for some reason the first content type I created appears in the drop down menu when I try to change a documents properties, but not the rest of the content types I created.

Any help will be greatly appreciated.  Thank you.

Error opening Office Open XML file when using SD workflow to create item in document library.


I have a Sharepoint document library that is using a word template with xml mapping (Word-Sharepoint).

I have a workflow created in Sharepoint designer that Creates an item in this document library with select data from a form library on the same site. 

It appears to create the entry in the document library correctly, it is showing the copied data from the form library and the correct default data in the columns specific to the document library. The explorer view shows the filename.docx files.

I am able to edit the data using the datasheet view, however it will not open the word document.

The error message reads "The Office Open file <filename> cannot be opened because there are problems with the contents." If I click on the details button it states "No error detail available".

Any ideas?

Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Workflow "Failed on Start (retrying)" when new item created by BizTalk SharePoint Adapter


We've been using the BizTalk SharePoint Adapter to load various different contents into a MOSS 2007 Document Library. The library has a Microsoft Office SharePoint Designer 2007 workflow (sequential workflow created in Designer) which starts automatically when a new item is added to the Document Library. Or, at least, it eventually starts automatically.


For some unknown reason--and this is what we're hoping some of you may have some ideas on--the workflow fails to start on the first try, producing the "Failed to Start (retrying)" message. When the timer job comes back the second time, the workflow starts successfully, but this causes us to loose five minutes of potential work time (not to mention making us look bad to the VPs and CTO because they see the failure message).


In checking the log, I find the following pair of error messages each time the "Failed to Start (retrying)" status occurs:


08/27/2007 13:49:43.24  w3wp.exe (0x0CA0)                        0x1438 Windows SharePoint Services    Workflow Infrastructure        72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line="1" Column="1" Text="The root activity type is invalid.&q

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


Sequential Workflow project unable to compile referencing x64 Workflow Activity Library

Folks -   I have an sequential workflow project targeting x64 that will not compile if the workflow activity library that it references is compiled for x64 (it will compile if the activity library targets x86).  The compile error I receive is: Compilation failed. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. [project name]   Any thoughts on how to figure this out?   Thanks.

Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.

Updating a List item field value in a SPD Workflow is setting Date fields to null

Hello everybody,I faced a very weird behavior while creating a workflow in SPD against a Document Library.Here is the case:1- Create a document library in sharepoint site.2- Add a custom column of type DATE.3- Upload any document to the library4- Edit the item metadata and set the custom date field to any date you want.5- Now using sharepoint designer, create a very simple Workflow with only one action that updates the current item "Title" field to any value. (Note: In my case I set the workflow to start manually and not automatically)6- Save the workflow and then start it on the uploaded item.7- Now check the value of the date column after the workflow is finished.8- You will see that the Date field is Empty... (very weird)Notes:   1-This behavior will not appear on a standard list. it is only appearing in a Document library.  2- I am using WSS 3.0 SP2 + MOSS 2007 SP2. Also SharePoint designer 2007 SP2Did anyone face this situation and does it have a fix, or am I doing something wrong here... Please help.Regards,Maheed

Workflow 3.5 Activity property is null in condition and nowhere else

I have an activity that has properties that look something like this (they're set up as proper dependency properties, I just kept it simple here): public List<MyType> TypeList { get; set; }public Int32 Index { get; set; }public MyType SelectedType { get; set; } and an execution that just does this: SelectedType = TypeList[Index]; TypeList and Index are values that I set from other activities. I don't set SelectedType to anything in the activity properties, I just let it get set in the execution. Now I know for a fact that SelectedType is getting set properly, I can even point another activity to it and print out some values from it. So I'm quite positive that there's nothing wrong with that activity. However, I have an if activity with a condition that looks like this: ((MyActivity)GetActivityByName("activity1")).SelectedType != null and it evaluates to false (meaning it evaluated SelectedType as null). I'm pretty sure that that activity cast is correct (I do things like that all the time), and if it weren't wouldn't I get a null reference exception when trying to access SelectedType? So I'm pretty sure I'm not doing anything wrong here, but for some reason SelectedType is coming up null in that condition and no where else. It's almost as if the condition is being evaluated before the activity is being run, but the activity comes well before the condi

SPD workflow status show "starting" when I create a document from the library !!. and hangs

I have a document library in MOSS 2007. Have created a WF and that starts "autmatically when new item created" In the document library I have created couple of column those are mandatory (required columns) and user has to fill those column while uploading a document as well creating a document from library. WF has ran and completed succefully  when I use "upload" option to load a document.  As you are aware, when we "upload" a document, we will have to fill all "required columns" and the click "check in" command button.  After I do all this, document get loaded and WD ran succesfully. However, the WF is not running when I create a document (.docx) from this library (using "new" button) !!.  I have filled all required field in the document information panel . After save & exit from WORD application, I can see WF status as "starting". But, it never started and completed.  So I did following and found WF worked !! a) After creating document (.docx) using "new" option I found WF status "starting"!. So,  I did "Check-out and Check-in" manually from document library. After doing this,  WF ran and status has been changed as "completed" b) In SPD, I change workflow start option from "Automatic" to "Manually start".&nb

Creating a new document in Document Library from custom menu item (in the ECB)

Hello! I created a custom menu item in the ECB for a document library. I'd like for this to create a new document from this menu item. Additionally, I'd like to create a workflow where the Title of the document from which the menu action originates is inserted into a custom textfield in the new document that is created. Is this possible using SharePoint Designer?

Item/Document permissions affect Library/List permissions

When I change the permissions on a item/document in a library/list the permissions are also changed on the library/list even though I stopped inheritance.  When I change the permissions on the library/list it also changes permissions on items/documents in that list even if inheritance is removed.

Customizing Send To Other Location Functionality for a document library item in Moss 2007

Hi All i have a requirment to customize the Send To Other Location funtionality. while using OOTB Send to Other Location option for a document library item we have  selection like Prompt the author to send out updates when the document is checked in? <input id="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateYes" name="ctl00$PlaceHolderMain$ctl01$ctl01$ShouldUpdate" type="radio" value="RadShouldUpdateYes" /><label for="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateYes">Yes</label> <input id="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateNo" checked="checked" name="ctl00$PlaceHolderMain$ctl01$ctl01$ShouldUpdate" type="radio" value="RadShouldUpdateNo" /><label for="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateNo">No</label> how we can set this option in my custom coding based on the user selection. i am not able to understand the functionality of the above option. can any one please explain the above option and let me know how to set this option programmtically in my custom code.   Thanks in Advance  muthu

how to send an email using sharepoint designer workflow when an item equals to end time

hi, How to trigger the workflow when current time is equl to end time. I need to send an document when  current time is equl to end time. I am using designer workflows(sharepoint 2007).I have created a variable and i am able to get todays date but not able to get time by default i am getting 12:00:00 Am.i want to get current time. can u please tell me.

Access Denied/The workflow could not copy the item workflow error after Sharepoint 2010 upgrade

We have a sharepoint designer workflow that copies a document from one library to another on the same site.  Before the upgrade to 2007 it worked fine, but now with 2010 it gives an error and cancels the workflow when it gets to the copy list item step.   The error on the workflow page: The workflow could not copy the item. Make sure the source and destination lists have the same columns and column settings.  Access Denied   Specifically it is the "copy list item current item to documentlibrary" sharepoint designer workflow action.   I have given the system account full permissions to the library and double checked that all columns are the same in both libraries. These are the verbose trace logs:   09/01/2010 09:46:04.05 w3wp.exe (0x17C4) 0x093C SharePoint Foundation Workflow Infrastructure 72er Medium System.UnauthorizedAccessException: <nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied. at Microsoft.SharePoint.SPFile.UpdateInternal(Boolean migrationSemantics, Boolean reGhost) at Microsoft.SharePoint.Workflow.SPWinOEWSSService.CommitCopyFile(Transaction txn, Object[] transData) 09/01/2010 09:46:04.05 w3wp.exe (0x17C4) 0x093C SharePoint Foundation Workflow Infrastructure 72fe High Error in commiting pending workflow batch items: Sys
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend