You must Sign In to post a response.
  • Category: Sharepoint

    How to read the value from new column in SharePoint?


    Are you looking for information on reading the value from new column in SharePoint? Want to know how to create a new column in SharePoint? Then read this thread to learn more about it.



    Hi,

    I have added a column based on person or group. The problem is that the selected user does not display in the list but when you edit the record the user name is there. What could be the problem?

    Will highly appreciate your response.

    Regards
    Frank
  • #739267
    When you create a new column in SharePoint, one of the column types is Person or Group . This allows you to select people from the GAL using a nice little picker control.I refer to use some link http://blogs.msdn.com/b/uksharepoint/archive/2009/02/17/quick-tip-using-the-sharepoint-person-or-group-field-in-code-part-1.aspx
    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/10/09/how-does-person-or-group-column-really-work.aspx

  • #739284
    You might not reading the value correctly.

    please provide the code you are using.

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #739314
    can you post your code here. without seeing the code we cant sugegst you the solution.
    Regards,
    Sugandha
    Microsoft Certified Technology Specialist
    MY Blog..

  • #741862
    Hi
    Try this:
    http://microsoftechies.com/2014/03/08/sharepoint-get-person-or-group-column-data-using-c/

  • #741863
    using (SPSite oSite = new SPSite("http://SP"))
    {
    using (SPWeb oWeb = oSite.OpenWeb())
    {

    SPList oList = oWeb.Lists["My List Name"];
    SPListItem oItem = oList.GetItemById(1);
    SPFieldUserValue userValue = new SPFieldUserValue(oWeb, oItem["Person or Group Column Name"].ToString());
    SPUser userVal = userValue.User;

    }
    }

  • #741865
    [Response removed by Admin. Read forum policies.]


  • Sign In to post your comments