.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Populate metadata on document upload?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#

Hi all

I need to automatically populate metadata on document upload in a SharePoint Document Library.

The data I have stored in an external list.

Any ideas or samples on how I can acheive that?


View Complete Post

More Related Resource Links

How do I pre-populate document quick parts based on site metadata?


Anyone have any thoughts on how I would populate data into document quick parts?

The answer seems pretty simple with content types and such, but the complication is that I want to pull in contact information from a list local to the site in which the library resides.  For example:


A project site is created.  The company's contact information is copied down to the site via the site creation process.  A Letter Standard content type is managed throughout the site, and pulls the contact information from the list and populates the appropriate pieces within the document automatically.

Anyone done something similar to this?

Auto upload Cognos reports to SharePoint document library with specific metadata


I want Auto upload Cognos reports to SharePoint document library with specific metadata.

Any ways to achieve?

Please help.

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

Office Development: Manage Metadata with Document Information Panels


Here the author uses Document Information Panels in the Microsoft 2007 Office system to manipulate metadata from Office docs for better discovery and management.

Ashish Ghoda

MSDN Magazine April 2008

How can I prioritise search results to show where document metadata has a hit first and then where t


When my users run a search against a site with a bunch of document libraries they will often search for terms that are in the title of the doc, if they do know the title they will put that in. What I would like to do is have the results ordered such that if any hits are on the document metadata (eg Title) then they are presented first and any results that are from hits on the content of the documents are presented later.

So, if they get the title spot on in their search query that document will appear first .... if they don't get it right then the likelyhood is that the title is something like what they entered so similar titled docs are presented first and then those with matching content ....

How can I achieve this?


Reg File Upload control to upload files from document library


In Field Upload control if we click browse button it allow us to search file in our hard disk but now as per my requirement as soon as user clicks ‘Browse’ button it should point to the document libraries and their files in site.Let me know how could i achieve this?

Thanks & Regards,


question on attachments/document upload in SharePoint

Scenario: I have business need where I need to attach some documents to a document library. My users fill out a form, which is a custom List Form in a list called "Request" but on the same form I want to provide my users a document upload feature which will save the document to a document library called "Request Documents".

In other words, request information such as Title, Department, Description etc get saved to "Request List" (SharePoint List) whereas the documents attached/uploaded (if there are any from the user) while filling the same request form out, get saved in the "Request Documents" (SharePoint Document Library) with the same ID #. If Request ID was 100, then the uploaded document(s) in the Document Library should also be 100.

I tried a few techniques out, and I'm reading some more on Data Source Library of SharePoint but I believe I need some help from the community before I do anything further.

How to maximize use of managed metadata in the document library?

We are creating new Intranet portal based on SharePont 2010 and we have document library with 100-200 documents. Old Intranet is based on previous version of SharePoint. End-users did not like the usability of the document library as it was hierarchical. Users needed to know, which was the folders and its subfolder to find out where is the document. We are currently investigating if we can solve this problem by using managed metadata. We know how to define term set and how to give metadata to the document, but we don't know what is the most usable way to utilizem them in the document library. Let say that end-user would like to see all documents that has managed metadata "User Guide". How to configure document library so that users see only those documents. Not all our users are skilled and we have to provide very intuitive way to search relavant documents to them. Some predefined metadata dropdown would be great.Kenny_I

Upload documents to Sharepoint 2010 Document library

Is there a way to upload documents to an SP 2010 document library with Custom Actions or Workflows?  I have a requirement of taking the contents of several directories (older data files) and uploading them to Sharepoint.  Not sure which actions actually perform this operation.  Any help most greatly appreciated.

New / Upload / Actions / Settings / View menus on a document library are hidden

I have a Document library. On the View Page (All Documents) for the Document library, I do not see the menu bar with the "New / Upload / Actions / Settings / View" menus. It looks like one of the users with owner permissions did something to cause this behavior. No custom code exists on the page. I am not sure how this menu bar can be hidden. Can someone please clarify. I am a site collection administrator.

Need to link multiple External Content List items to a single document metadata column

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

How To "Upload a new document template" to Content Type via Web Service

I hope someone can help me. Let me begin by saying that I'm not a programmer; so I 'may' not get the terminology exactly right, but hopefully someone will know what I mean. I am using SharePoint 2010 along with a 3rd party application that I'm using for creating, managing and executing workflows.  The workflow application I'm using is Nintex Workflow 2010.  As such, I can only use functions, services, commands...etc...that are offered to me by that application. Anyway, what I am trying to do is simply replace a document template that is being used for a particular content type with another document template. For this I believe I need to use the Webs.UpdateContentTypeXmlDocument Method.  More information is provided here (http://msdn.microsoft.com/en-us/library/websvcwebs.webs.updatecontenttypexmldocument.aspx). The Webs.UpdateContentTypeXmlDocument method requires two parameters..."contentTypeId" and "newDocument". "contentTypeId" - I have got the Content Type ID by clicking on the content type and viewing the URL shown in my browser.  So, I am confident that my content type id is correct and is "0x010100C392CF11DE923A4E8AB9018B0A42119303". "newDocument" - The MSDN article states...'A string that represents the XML document to replace the existing XML document.".  To be honest, I'm not 100%

Is it possible move documents based on managed metadata to Document sets

I would like to all documents who have managed metadata "personnel" to the Document Set "HR". Is this possible with workflow?Kenny_I

How to rename the document using event receiver during upload

Hi all, I am going to programmaticlly rename the document when it is being uploaded to the document library. In Visual Studio 2010, I used the event receiver and choosed the documment libray type, for the event I selected 'ItemAdding". However I am not able to update the file name using the codes inside this thread: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5c3dcc5d-3113-463d-8835-2a050b2471a6/ Can anyone help me with this problem? Thanks!

Search Results Customization - Display Document LibraryTitle Instead of Document Metadata Title

I am running a pretty basic SharePoint 2010 setup that is being used as an intranet for my organization.  This also includes service up internal documents to our users.  Currently, our documents are displayed on various pages using the CQWP and are organized by title as dictated by the document library title.  As part of the search capabilities of this site, I have implemented a basic search page to return results on the documents from this list.  The problem I am running into is that the search results are displaying results based on the metadata title of the actual document instead of the assigned document library title. My questions are this: How do I change the search results so they display based on the document library title? How do I view what columns are currently being crawled by the search capabilities? Thanks in advance for any help you might be able to provide!

ASP:Upload control . Uploading into a SharePoint Document Library Subfolder and FILE NOT FOUND error

RE: ASP:Upload control . Uploading into a SharePoint Document Library Subfolder and FILE NOT FOUND error Two Issues, apparently unrelated. I have subfolders like this /ApplicantDocuments/20 and /ApplicantDocuments/21 (where 20 and 21 are my subfolders and ApplicantDocuments is my library. 1. The below function is erroring with file not found, but I confirmed I'm sending the fully qualify path (i.e c:\test.txt) to System.IO.FileStream content = System.IO.File.Open(documentFileName, System.IO.FileMode.Open); 2. Even if it worked, looking at the code, I'm not using argument foldername.  I'm passing 20 to the argument. How can I make sure it uploads into subfolder 20 of ApplicantDocuments? Thank you.     Just testing in test environment. Will tighten code once it works.   public void UploadDocumentToSite(string foldername, string documentFileName) {      SPSite siteCollection = new SPSite("https://xxxxxx");      SPWeb web = siteCollection.OpenWeb();      //SPSite.AllowUnsafeUpdates = true;      //Web.AllowUnsafeUpdates = true;      string Lib = "ApplicantDocuments";      SPFolder destFolder = web.GetFolder(Lib);      sendmail(documentFileName+" "+foldername);  

How do I upload and overwrite document while keeping the same document properties?


I need to upload a new version of an existing Word document (same file name) while keeping the properties that have already been set in Sharepoint for the document. I can only find that the properties are either deleted or reset to default values. How do I avoid this?

I have tried both with and without versioning activated. In either case the properties are reset.

I have also tried to overwrite the document throught the web interface and through Office/Explorer. Same apply here.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend