Question

I have a document library in MOSS 2007 which has folders and files. Document View in the document library has the following columns: document name, type, Created datetime, created by,modified datetime. How to configure the view so that it doesn't show any information for "modified", "created" and "created by" fields for folders. In other words,I want those fields to be empty for "folder" content types in document library document listing. Thanks in advance.

[Edit] Although, Paul-Jan's answer partially addresses my question, I still don't how to solve the columns "Created By" & "Modified By". There's no attribute to refer them in "Calculated Value". Kusek said "Editor" can be used to address the "Modified By" attribute of a document but that is not working

Was it helpful?

Solution

You can use calculated columns to do this. For each column you want to have, create a calculated alternative, testing whether the content type is or isn't "folder". For example, you'd create a column ModifiedNoFolder, defined as

=IF([Content Type]<>"Folder",[Modified],"")

Make sure to assign the right type to the calculate column (datetime). Now remove the original Modified column from the view and add ModifiedNoFolder in stead.

Oh, and if you meant "in code" (making this question more programming-related), you could do the above in code. :-)

OTHER TIPS

You could add javascript to the master page or the view's aspx page that will search the DOM for the relevant sections and hide them.

modified by = @Editor is in the form of html value.

The suggested calculated column w/ formula: =IF([Content Type]<>"Folder",[Modified],"") will not work for documents being added to a library. Apparently this column is set before the modified date is set, so when upload the doc, the calculated column value will be set to "12/30/1899 12:00 AM" and the modified value will have the correct date/time

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top