A colleague of mine developed a workflow which auto set title to document. With this workflow,as he put it, he can optimize the research and lookup things like that. However I think it can be done just by name of document. There are must be some kind of story behind this. Could someone help me here? Thanks!
"Title" is a field on the entity in the database. "Name" is what uniquely identifies the SPFile underlying the document. So you can think of Title as pretty arbitrary; you can change it just like you would change any other property (description, etc.) but if you change the Name, it is akin to moving the file. Names must be unique in folders/webs.
From the properties of SPFile on MSDN:
- Name: Gets the name of the file including the extension.
- Title: Gets the display name of the file.
When uploading a document by default the 'Name' property will equal the file name of the document. For example if I upload MyDocument.docx then the 'Name' property will equal MyDocument.docx. The name property works the same as a file name typically does, if I have a site at http://myserver.com/MyWeb/default.aspx and the file is stored in a document library called 'MyDocuments' then I would be able to access the file at http://myserver.com/MyWeb/MyDocuments/MyDocument.docx. If I change the name to NewDocument.docx then I would access the file at http://myserver.com/MyWeb/MyDocuments/NewDocument.docx.
The 'Title' property is just extra metadata assigned to the document. In the case of the above someone might be inclined to avoid using spaces in the filenames of their document, but with the title field they can be free to add them in. It would increase readability and still allow for any filename restrictions.
In the case of your colleague he might be wishing to avoid certain characters or formatting in the file name - or just simple doesn't want to rename it on the users - and so he is modifying the title (metadata) rather than the file itself.
© 2022 - 2024 — McMap. All rights reserved.