Customizing Subject View
In SharePoint Designer, in lists and libraries, click Discussion List.
Under views, click on Subject.
In the code view, change ReadOnly=”TRUE” to ReadOnly=”FALSE”
Creating a Worfklow to set Category ID
In the discussion list, go to the LIST tab, then choose List Settings
I named the column CatID
Make it a Number field
Uncheck “add to all content types” – we want the item to be hidden from all input screens.
You are free to Leave “add to default view” checked. – I don’t think this really matters because the default view is Subject anyway, and it doesn’t really show anything with the CATID in there.
Do NOT require that this column contains information – it will be completed by a workflow. We don’t want users seeing this item.
Within SharePoint Designer, open the site, and click Workflows on the left menu.
Click on List Workflow, then choose discussion list
Give the workflow a name – keep it short, since it will be the name of a column later.
Write a detailed description so that you will know what the workflow is meant to do.
In this following screen, make sure you select all the Start Options because you want this change to always be made, whether it’s a new discussion item, or a changed discussion item.
Click on Stage 1 and rename it to SetCatID (again, keep this short)
From the Action Dropdown, pick Set Field in Current Item
Click on Field and choose CatID from the drop down menu
Click on Value, then the 3 ellipses to open the lookup window
Click on Add or Change Lookup
From the Data Source Drop Down, choose Categories
From the field from source field: choose ID (you want the value from the ID column in the Categories table).
Under “Find the List Item” choose Category name as the field, then click on the fx button and select Category
You will get a message saying that you may not get unique values, click YES.
What it’s saying is that if we have two category names that are identical, it would only show the number for the first one.
In the string builder, you will see only this. Click OK.
Right-click the Transition to stage section and choose go to a stage
Click on go to stage and choose End of Workflow
Check to make sure there aren’t any errors by clicking the Check for Errors button. Then hit Publish.
Test your new workflow by creating a new discussion item, or changing the category on an existing item.
You may need to add the CatID field to the Management view in the discussion list so you can see it populate.
You may also want to add the Set CatID field to the management view for testing purposes.