SharePoint Developer Center > SharePoint Products and Technologies Forums > SharePoint - Workflow > How to prevent SPD workflow status column to appear in my default views?
Ask a questionAsk a question
 

AnswerHow to prevent SPD workflow status column to appear in my default views?

  • Thursday, February 05, 2009 8:36 PMflaurin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,
     
    I have a couple of "maintenance" SPD workflows (that sets dynamically permissions or send notifications) on lists. The problem is that when they start automatically, they add their status column to the default view of my lists, overcrowding them uselessly (the users don't need to see them).

    I use my site as a "workspace" that is to be redeployed several hundred times and the users will not be able (or willing) to remove the columns for each site...

    How can I prevent the workflow status column to show in my default views?

    Thanks for your help.

Answers

  • Monday, February 09, 2009 6:19 AMXue-Mei Chang-MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    When a user starts a workflow on an item, Windows SharePoint Services 3.0 adds a new column to that item. This read-only column displays the current status of the item within that workflow. This status column is added automatically for each workflow the first time it is run, so it is not possible to prevent the column added into the list view out of the box.

    I think you can hide this column in the list view manually after the workflow first running. 

    Hope it can help you.


    Xue-Mei Chang

All Replies

  • Monday, February 09, 2009 6:19 AMXue-Mei Chang-MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

    When a user starts a workflow on an item, Windows SharePoint Services 3.0 adds a new column to that item. This read-only column displays the current status of the item within that workflow. This status column is added automatically for each workflow the first time it is run, so it is not possible to prevent the column added into the list view out of the box.

    I think you can hide this column in the list view manually after the workflow first running. 

    Hope it can help you.


    Xue-Mei Chang
  • Monday, February 16, 2009 3:22 PMflaurin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yes that was what I was affraid of. Because the site template is so often redeployed, it is not possible for me to hide the column one by one. I guess I'll need to live with it. Thanks for the confirmation, though.
  • Wednesday, May 06, 2009 2:30 AMValdonMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    I was also trying to find a way to prevent this and apparently it can't be done.  So instead I wrote some code to remove that field from the default view.  You can find it on my blog at http://blogs.msdn.com/valdon/archive/2009/05/05/removing-extra-workflow-status-column-in-default-view.aspx.  Unfortunately, this can't be done in your site template code since the field doesn't exist until after the first workflow is run (unless you want to write code to add an item to the list, wait for the workflow to add the field, and then remove the field).
  • Wednesday, November 04, 2009 5:32 PMcriskrit Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    this may sound like a primitive hack but I did the following:
    - designated an otherwise unused View as the default
    - explicitly used my desired View(s) in links and URL
    this way the default view gets the workflow column but nobody ever notices because the default view is not used anywhere.