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
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. :-)
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
Related
0
I have created a Document Set Content Type named "Contract" with 2 shared columns (Start Date, End Date). I have also created a Document Library named "Contracts" which use this content Type.
I have created a new contract "Contract 1" based on the "Contract" Content Type then I have uploaded a word document within the "Contract 1" Document Set, then a Edit form popped up asking for updating the Start Date and End Date properties but these 2 properties have already inherited the values of the document set's properties and I dont want the values of these 2 properties to be updated at the file level (I want them to be always the same as the values of the Document Set 's properties)
So I am asking you if there is a way to prevent the user from changing the properties values of the uploaded document, so that they always stay the same as the ones inherited from the document set which it belongs to.
Thanks,
Regards
As per my knowledge, there seems to be no OOB way to prevent this. You have to educate your end users not to modify the original metadata.
In Modern Sharepoint I created a Document Library by New>Document Library and then uploading *.png files.
They are stored in a Column Name called Name (linked to document with edit menu). This can be seen in Settings>Edit View
Now I want to create a Calculated Column to calculate the last character before the .png in the filename which are in the Name Column.
I go to Add Column > More > Create Column and define Column Name and Type.
Then defining the formula but the Name column does not appear in the drop down list.
Any suggestions ?
thx
It's known case. We cannot use filename in calculated field. You could vote here: https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/36029680-use-filename-in-calculated-field
As a workaround, you could use workflow /flow to make the Title field gets the filename. Then use title field in the calculated column.
In my list i have created calculated field to get the difference between the last modified date and today's date.
I use the formula
=datedif([modified],[today],"d")
It is throwing an error : The formula contains reference(s) to field(s).
Please advise.
I do not have a separate column to hold today's date.
Regretfully, you cannot use [Today] for calculated fields. Calculated fields only update when an item is modified, so the Today Trick of creating a column named Today, setting your calculated field, then deleting that column, is a bad move.
You have a couple options, the best of which is probably to use JavaScript within a Content Editor Web Part on the page to do the calculation for you. You could also try using SharePoint designer and custom XPath and xslt to get "days since modified" to appear on your page.
Generally, if you want something to identify items that haven't been modified in a while, it should be done with filter library views: they can use [Today], and they don't require tricks or workarounds.
I have a Person field in my custom list. I want to have a view that will show multiple fields from that Person instead of the one I had to choose when creating the Person column.
So basically I want to have one column for Person and then in the view see Name, title, email, phone. All of those are valid choices but I can only pick one right now.
I really want to avoid typing in the username lookup for each column I choose to display.
This is SP 2007
It sounds like you need to create a custom fieldtype (with a fieldcontrol) that inherits from the userfield but in viewmode renders out the different columns you need. Is that something along the lines you are looking for?
http://www.sharepointblogs.com/nicksevens/archive/2007/08/31/create-custom-field-types-for-sharepoint.aspx
Note: This link is broken
You probably want a Computed Field. Note that this is not a Calculated Column. A Computed Field is what is used to display the same data is different ways. In SharePoint there is a Title field, but there is also a "Title (linked to item with edit menu)" computed field as well as a "Title (linked to item)" computed field.
See midway down this link for more details. I'm not sure if it will have all of the power that you need, but if it does it is almost certainly what you are looking for if you don't mind getting into the Schema XML file a little.
Could you use a DataView web part for this? If it's just a question of viewing the data that might be suitable.
Came across this thread and thought I'd add a tip. This suggestion is clearly not for every use case, but may work well in situations where you're managing a list rather than allowing manual inputs (verified to work with SP 2013):
Create a spreadsheet with columns to match your SharePoint list that contains multiple profile fields. (for example: name, phone number, email address)
In the spreadsheet, enter the same email address in all of the person/group field types in that row. (e.g., boss#company.com, boss#company.com, boss#company.com)
Select and copy the row(s) you wish to transfer to SharePoint.
In SharePoint, change the list view to "Quick Edit" and paste the row(s) into the grid.
SharePoint will process each field and convert the email address to the profile value you selected during the list setup.
I have something funky going on with MOSS & was wondering if anyone out there has seen anything like it:
I have a document library in MOSS that has several custom columns added to it. I have a column of type choice. For one document in the library (a word document), the selected value does not get displayed for the one column - all of the other columns are fine & the other 60 documents in the folder display the selected values correctly. When I edit the properties of the document, the value of the column is defaulted to blank, I can change it to another value & save it. However the new value doesn't get displayed in the list view, nor does it show up if I edit the properties again.
If, I open the document in word & view the Document Information Panel it displayes the value that I had selected & saved for the column. However, the column is being displayed as a text box & not a drop down. The value still does not get displayed in the list view or properties view after a save.
Has anyone seen behaviour like this before?
My first guess is a name collision between your custom column and the columns that ship with SharePoint out of the box. What is the column name that is causing the problem?
I have seen situations like this when there are documents in a library, and then columns are added. The existing information does not get updated properly.
If you reupload the document as a second content, does this happends again ?
If yes, you may check advanced properties of the document before uploadind it. There may be some data in it that SharePoint try to use when importing the file. It may explain that you don't have the issue when you copy/paste only the content.
Along a similar line, it could be that the problem doc has a Word metadata field named subject, and MOSS is doing its property promotion thing to mess up your field. If so, clearing the Word metadata might fix it.