.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

Adding multiple users to a document library column by web service

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :SharePoint

I'm attempting to create some VB code to call a SharePoint Web Service to add a document and associated metadata to a document library. I can successfully add metadata to a text column but I'm having some problems getting multiple entries into a column which is specified to take multiple users (and does so when they are added manually) although I can get a single user in using the following snippet.

Dim info2 As MySharePoint.FieldInformation = New MySharePoint.FieldInformation()
info2.DisplayName = "Authors"
info2.InternalName = "Authors"
info2.Type = MySharePoint.FieldType.User
info2.Value = "1"

I'm hoping that someone will be able to advise me of the approach or syntax necessary to add multiple users to this Authors column e.g. Users 1 and 74. I note that

info2.Value = "1,74" or info2.Value = "1;74"

don't appear to work.

View Complete Post

More Related Resource Links

Creating a custom column with a link to document (other than the name field) in document library



I have a document library with the standard name column linking to the document. However, we'd like to create a custom field and have that link to the document (and edit item menu).

How is this best accomplished?

Thanks in advance!


Error adding a document library to a site



I am receiving the error "Cannot complete this action.  Please try again"  when trying to add a document library to one of the sites.  This is Sharepoint 2007 SP1.  I seem to be able to do it thru designer but not the web interface.

Does anyone know how to fix this?

MOSS 2007: list column that lookup to multiple documents stored in doc library

Hi All, I'm trying to understand how to customise MOSS to achieve the following: I need to lookup from a list to multiple documents stored in a documetn library. Example: - List item 1 --------> Lookup to Doc 2                   --------> Lookup to Doc 5 - List item 2 --------> Lookup to Doc 3                   --------> Lookup to Doc 5                   --------> Lookup to Doc 8 - List item 3 --------> Lookup to Doc 1 How can I achieve this? is it possible that in the lookup I have a "search" option? Thanks all Vit

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?

Hidden site column shows as 'optional' in created document library

In Sharepoint 2007, I created multiple site content types.  From these I created other content types based on the original site content types.  To these second group of content types I added a site column which is hidden.  I craeted a document library and saved it as a template.  I then created a new document library using teh document library template.  When I then look at the hidden column for the content types in the document library, the previously hidden column in the default content type is now 'optional'.  The hidden column in the other content types is still showing as hidden.  Any clues as to why?  Thanks in advance.

Currency and number column error with office 2007 document formats in SharePoint 2010 library

Hi there,



The following error occurred within a SharePoint 2010 document library:

As I tried to test out the new SharePoint 2010 environment I changed the metadata from a few documents within a document library. I noticed that the data from the currency und number field was incorrect from a few documents. The numbers looked like that the decimal separator were ignored. For an example: 123.456,78 was saved as 12.345.678.

At first I thought it could be a language incompabilty but if that would be the case: Why would there be other documents which show the correct number?


I created another document library to recreate this error. And there I noticed the real reason: Every time I changed these fields from a document which was saved in the office 2007 format the error occurred. The metadata from the documents in the office 2003 format were correct.


Has anyone a similar problem or got an idea how to solve this problem?


System Specs:

Frontend: Windows Server 2008 SP2 ent

Document Library version restore not behaving as expected on the "Name" column (file name)


After a rollback to a previous version, the value of the column "Name" in a document library is not restored. All other columns are restored properly. It seems that the column "Name" (file name) is excluded from the process of versioning.

I didn't find information on this behaviour on the internet. Any suggestions ?


WildCard Search using document library column


Hi there ,is there any step by step instructions on how to make search using custom columns with wildcard i mean ability to make user fill fields for column like

Registration code [and the user type something]

ItemName[and type another word]

then finally press search

what i have did for now is

created custom columns for document library

created a scope for this specific document library

created managed property mapped to crawled property of these columns

edited properties xml and added propertyDef and PropertyRef

installed DotNetMafia wildcard webpart and activated feature and added this webpart to page.

then no searchbox appeart ,what am i missing?


Possible bug in SP2010 - Managed metadata column and STP document library template


Hello I have a problem with managed metadata on two different servers and would like to ask you to try it.

I assume you have managed metadata service running.

1, Open some document library in some site
2, Create column - managed metadata type and select some termset and set it as required.

3, Upload a document and fill in metadata when you will be asked.

4, Then edit properties and check, that metadata are there.

5, Save this library as template.

6, Deploy document library from this template and try steps 3+4.

My problem is, you can select metadata, but they are not saved. e.g. when you check document properties managed metadata are not there.

Can you confirm this behavior ?
Thank you very much.


P.S.: one more weird thing. If you do metadata filling using office 2010 compatible application. Metadata remain there, but they are not visible in document library properties.

Tomas Paulas MCP,MCSA,MCSA-Messaging

How to place security on a document library such that users only see documents they created?


When using lists, it is easy to specify that users can only see lists that they created (through Advanced Settings)... Is there a similar way to do this with document libraries? Rather than doing item level security... Thanks.

How do I get all the users are set for alerts to a document library using C#.net


Hi All,

I want to get all the users set for alerts to a SharePoint document library using C# code. Please guide me to do this. I would appreciate your help.

For Example: If my site collection having 5 sites. I want to get user names of a document library of one site.



Default Column Values in a Document Library (SP2010) do not show up in word 2010 until you save and


when you create a document in a SP 2010 document library (of a particular content type, by clicking new, letter (content type name) in sharepoint for example) which has default values set on in in the library (set by using library settings -> change default column values), the default values do not show up until you create the document , save it and reopen it again.  Is this a bug or by design.  If it is by design, it is horrible since if some of the column default values are mandatory in the content type then you actually have to type them in before you could possibly save the file which defeats the whole point of having default column values.  Also it is tremendously clunky for a user to have to create file, save it , close it, and reopen it just to view the default metadata in the document information panel that is supposed to be there.

Anyone have any thoughts/solutions to this problem?


Outlook "Save as" in document library with all custom column


I want to put my Outlook 2007 email in my sharepoint document library (moss 2007).
To do that, I do "Save As" in Outlook. In "My Network Places" I put the url of my library.
Then, in some cases, my email is saved directly. And in other cases, outlook opens me the form to inform the different meta-data "web file properties" (
that's what I want) . it does not save the field values. It takes the default values of columns. Same required columns
Lire phonétiquement

However, in any case, the metadata are stored in sharepoint.

Do you use this method?
What configuration of my document library must have that outlook I am proposing to fill the metadata? (Docume

document library security permissions on column value

I have created a document library with several number of documents there are 8 divisions so I have given a column called division with choice of selecting one of the divison as a column value now I want to set permissions to users of a divsion to read and write (edit checkout and author) only his respective divisoin and also read only access to all other documentsof other divisions.

document library column header is missing


When I open any document libraries within a specified site collection, I found out they all missing column headers. I could not do sorting on the columns. Anyone knows why?

Thanks in advance,



Adding New Custom Folder Content Type doesn't show up on the Document Library New Menu


I been trying to add new custom folder content type to the document library programatically in my sandbox environment and it does show up on the document library. But, when I move same code to the almost similar configured SP2010 environment, adding new folder content type to the document library doesn't show up on the document library's new menu.

Here is the code? Since this code works fine in my sandbox environment, is there any other settings I should check on the server environment which would cause hiding content type on new menu of document library.

  class Program
    static void Main(string[] args)
      SPSite spSite = new SPSite("http://sp2010vm");
      foreach (SPWeb spWeb in spSite.AllWebs)
        spWeb.AllowUnsafeUpdates = true;

        //For each site, cycle through lists
        bool isDocLibraryExists = false;
	      foreach(SPList spList in spWeb.Lists)
          if(spList.Title == "Classified Documents")
             isDocLibraryExists = true; 
        if(isDocLibraryExists == true)
          //Create new doc library
          SPList splist = spWeb.Lists["Classified Documents"];

          //Create Content Type
          SPContentType documentContentType = spWeb.AvailableContentTypes["Classified Documents Folder"

need a column in document library which can open the document


I need to create a column in the document library which opens the same document on clicking ???


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