Workaround to using "Person or Group" field in a "Calculated" column formula?

Apparently, SharePoint does not allow you to insert a "Person or Group" column into a "Calculated" field's formula.
Is there a workaround to adding a "Person or Group" column into a "Calculated" field's formula?
-Maybe a way of coverting the data from the Person or Group column into a text field, and referencing that text field in the formula?
Microsoft mentions only Columns of the following data types can be referenced in a formula: single line of text, number, currency, date and time, choice, yes/no, and calculated.

Hi AskMicrosoft,
Have you tried to use a workflow?
1 Create a new text column in the list.
2 Create a workflow and use
Update item in this list Action > Add the new text column to the value in people and group column.
Then you can add the text column in calculate formula.
Hope it helps.
Best regards. Emir

Similar Messages

  • How to Insert Sharepoint 2013 Person or Group Field using VBA

    Hello,
    How to Insert Sharepoint 2013 Person or Group Field using VBA , I tried set the field with ID / ID;Name / Name
    but all failed, Please advice 
    Function SetSP_Field(F_Yer As Single, F_WekNo As Single, F_ProjectNum As String, strField As Variant, strFieldValue As Variant) As String
    ' test code
        Dim rst         As Recordset
        Dim strSQL      As String
        Dim SP_RecSet   As ADODB.Recordset
        Set SP_RecSet = New ADODB.Recordset
        SetSP_Field = False
        strSQL = "Status Report"
        On Error Resume Next
        Call SP_Connect(2)
        strSQL = "select " & SP_List & ".* From  " & SP_List _
               & " Where [Year] = " & CInt(F_Yer) _
               & "   and [WeekNo] = " & CInt(F_WekNo) _
               & "   and [Compass_Code] = '" & F_ProjectNum & "' ; " _
    '           & " Set " & strField & " = " & strFieldValue
        'Debug.Print strSQL
        'Debug.Print SP_CN
        SP_RecSet.Open strSQL, SP_CN, adOpenStatic, adLockOptimistic
        If SP_RecSet.RecordCount = 0 Then
            Debug.Print "Record for project: " & F_ProjectNum & " not found"
            LogFile.WriteLine ("Record " & strID & " not found")
        End If
        If Not SP_RecSet.EOF Then
            'SP_RecSet.Edit
            SP_RecSet.Fields(strField) = strFieldValue
            SP_RecSet.Update
            If Err.Number <> 0 Then
                MsgBox ("SP Update Error: " & Err.Description)
                GoTo Exit_Fun
            End If
            SetSP_Field = True
        End If
    Exit_Fun:
        SP_RecSet.Close
        Set SP_RecSet = Nothing
    End Function

    Hi Tim,
    Let’s verify the followings:
    Whether this issue occurred for other lists in the same site.
    Whether this issue occurred for all users who don’t have full control.
    Whether this issue occurred on other sites.
    When you created the people & group column, which show field did you used? Please try to use a different show field for the people & group column, compare the result.
    In addition, please check if the link is useful:
    http://www.learningsharepoint.com/2013/08/21/empty-value-in-people-picker-after-saving-the-list-form-in-sharepoint/
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to modify person or group field value with new value

    Hi
    I have person or group field having property Person Only.
    Thsi firls already have one value. Now I want to update it but this code to update value is not working.
    string myName = @"ABC\myname";
    web.EnsureUser(myName);
    SPUser myUser = web.SiteUsers[myName];
    SPFieldUserValue myNamevlaue = new SPFieldUserValue(web, myUser.ID, myUser.LoginName);
    oSplistItem["My_x0020_User"] = myNamevalue;
    oSplistItem.Update();
    I am getting myNamevalue correct in the veriable. But why its not updating in the list?
    is there any issue in the above code?
    Do I need to delete previous value and then update new value in this field? How?

    Hi,
    The format of the user value in people/Group field must be
    ID;#Name, you can use the following code snippets to update the people/group field.
    string loginName = "ABC\\myname";
    SPUser user = web.SiteUsers[loginName];
    SPList list = web.Lists.TryGetList("ListName");
    if (list == null)
    Console.WriteLine("list is not exist!");
    return;
    SPListItem item = list.GetItemById(3);
    item["My_x0020_User"] = user.ID.ToString() + ";#" + user.Name;
    item.Update();
    Thanks,
    Jason
    Please remember to mark the reply as answer if it help, and unmark the answer if it provide no help.

  • How to add users from person or group field in a sharepoint list to sharepoint group

    Hi,
    How to add users(single or multiple) from person or group field in a sharepoint list to sharepoint group programmatically?
    Any suggestions would be appreciated.
    Thank you,
    AA.

    Hello,
    Use SPGroup.AddUser() method to add user in group. I have just written sample code in notepad so it is not tested:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using(SPSite Site = new SPSite(SPContext.Current.Site.Url))
    Using(SPWeb Web = Site.OpenWeb())
    SPList list = web.Lists["ListName"];
    SPQuery query=new SPQuery ();
    query.Query = "<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Test</Value></Eq></Where>";
    SPListItemCollection items = list.GetItems(query);
    if(items.Count > 0)
    foreach(SPListItem item in items)
    //Get USers from person or group column
    SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users");
    SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString());
    SPGroup spGroup = spSite.RootWeb.Groups[groupName];//group name
    if (users.Count != 0)
    bool isUserInGroup = false;
    foreach (SPFieldUserValue user in users)
    foreach (SPUser item in spGroup.Users)
    string itemUserName = item.LoginName;
    string UserName = user.User.LoginName;
    if (itemUserName == UserName)
    isUserInGroup = true;
    break;
    if (!isUserInGroup)
    spGroup.AddUser(user.User);
    The above code will query list item and then get users from "Users" column. Now it will check whetehr user is already in group not, if not then add user in group.
    http://rajanijilla.blogspot.sg/2012/09/add-users-to-group-programmatically.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Copy person & group field value to another person or group field programmatically

    Hi 
    I have one user list in SharePoint sitecollection1 having User in Title(having simple user name) and UserName in Person or Group type field.
    I want to copy this list into my site list with same column names programatically using timer job.
    How I can copy the person or Group field from siteColletion1 to person or group field of sitecollection2(my site),
    as both column types are same.
    Pleas suggest any solution.

    I am getting user name and user id using following code,
    foreach (Microsoft.SharePoint.Client.FieldUserValue userValue in oclistItem["UserName"] as Microsoft.SharePoint.Client.FieldUserValue[])
    string username =    userValue.lookupValue.tostring();                               
    But how to get the login name ? or how can I get the User Object from this field?
    Anybody got this type of issue before.
    Please suggest any solution

  • Sorting and filtering by select-multi person or group field in the list in SharePoint 2013

    Hi everybody,
    In SharePoint 2013, I have defined a column as "Person or Group" field, which you allow for multiple selections. when I try to sort/filter it by this field in the list. The field doesn't show up in the dropdown. If I changed "Allow multiple
    selections" option to "No" by clicking the column name to edit it in "List Settings", the field can show up sort in the dropdown.
    How about support sorting and filter by select-multiple "Person or Group" field in sharepoint 2013?
    BTW, in SharePoint 2010, it can support this issue no matter what the "Allow multiple selections" option the request is.
    Any help would be great!
    Thanks,
    Jodie

    Hi Jodie,
    Can you please give this as a try.
    To fix the Filter Issue on Assigned To Column. We need to run the following scripts.
    The field which allows more than one values or which allows multiple selections. The multi-valued fileds are non-sortable,
    non-filterable. Multi-valued fields cannot be indexed
    $web=Get-SPWeb
    $list=$web.Lists[] $field=$list.Fields[ColumnName] $strSchema=$field.SchemaXml $str=Schema$strSchema.Replace("Sortable=`"FALSE`"","Sortable=`"true`"")
    $field.SchemaXml = $strSchema
    Krishana Kumar http://www.mosstechnet-kk.com
    Thanks for your reply, I have tried to run the scripts, but it still cannot work. The following is my scripts:
    $web=Get-SPWeb 'http://cst-server-01'
    $list=$.web.Lists["Product Request"]
    $field=$list.Fields["Applicant"]
    $strSchema=$field.SchemaXml
    $str=Schema$strSchema.Replace("Sortable='"FALSE'"", "Sortable='"True'"")
    $field.SchemaXml = $strSchema

  • Save history values of person or group field in another person or group field

    Hi
    I have a person or group field in sharepoint list that users can assign task to colleagues by this column. Every time value of this field changed and I want to save
    these values in another person or group field (for history and 
    filter view base on it).
    How I can do this?
    Thanks.

    I create workflow variable and give it these values:
    First Person/Group value,(Display Names, Semicolon Delimited),
    Second Person/Group value,(Display Names, Semicolon Delimited)
    Then I set this variable to Second Person/Group but it's give me error and does not work.

  • Person or Group field not storing data that is entered.

    Hi guys,
    I'm having a bit of a frustrating time trying to import the records of 900+ staff members into a list and then create a view that shows only the currently signed in user.
    Now I've got my list all sorted out lovely and the way we have it set up is that the users payroll ID is their unique ID for everything, their log in for AD and SharePoint. This gives us a nice advantage and I'd hoped that with a column in our list with
    the users Payroll ID we could use that to match the username of the currently logged in user, I was wrong as it will only allow me to use a person or group column.
    MY ISSUE is that when trying to copy the column containing the Payroll ID, which is also the users username in SharePoint, in Datasheet view into the person/group column I get the following error for most of records (some of them do work and contain the
    information correctly).
    "The text entered for Username isn't an item from the list. Select an item from the list, or enter text that matches one of the listed items."
    After getting frustrated at that I then edited our Info Path form for users to modify their details with and added a field that linked to the column. When in the form this field accepts the payroll ID and outputs the users SharePoint name (not username)
    as expected but when saving the form it doesn't update the column.
    Any suggestions?

    I suspect the reason you can't insert the users automatically is that the users haven't visited or been mentioned on that site previously. SharePoint caches user data (in the hidden user information list) on each site collection which means that if you were
    to copy and paste a user who hasn't been on the site before it'll fail to find them in the cache. In normal circumstances using the people picker it'd identify the cache is empty and check for the user in AD but it may be failing for you in datasheet view.
    To confirm find one of the users that failed as part of the C&P, add an entry for them manually, delete it and then re-try the copy and paste.

  • How do I populate a "Person or group" field via Elements.xml?

    So I have created a field titled "EmployeeName" and it's a "Person and Group" type. (View the Schema.xml below)
    <Field Name="EmployeeName" ID="{8579a35a-71a8-4070-b907-b6ede0daa352}" DisplayName="Employee Name" Type="User" />
    Now, I'm trying to populate the column via the Elements.xml file. As you can see by the commented out code below, I've tried every combination and I'm still unable to populate this column:
    <ListInstance Title="Employee_Rec_list" OnQuickLaunch="TRUE" TemplateType="10000" Url="Lists/Employee_Rec_list" Description="My List Instance">
    <Data>
    <Rows>
    <Row>
    <!-- <Field Name="EmployeeName">i:0#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">i:0#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">0#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">#.f|membership|[email protected]</Field>
    <Field Name="EmployeeName">[email protected]</Field> -->
    <Field Name="EmployeeName">[email protected]</Field>
    <Field Name="Achievements">Rock Star</Field>
    <Field Name="Achieve_x005f_Des">Cras congue varius metus, in tincidunt metus Vestibulum vel turpis nec leo porttitor pulvinar fringilla ut lacus. a dictum aliquam. Pellentesque non felis cursus, lobortis, mattis arcu. Duis molestie nisi quis lectus tincidunt, a porttitor turpis iaculis. Donec condimentum, tellus sit amet hendrerit aliquet, est eros faucibus nulla, eu ultricies ligula ante id quam. Suspendisse suscipit orci sit amet vestibulum ultrices. Nunc dictum tortor non magna volutpat</Field>
    </Row>
    </Rows>
    </Data>
    </ListInstance>

    Ok I figured it out. You need to you use the users ID.
    <Field Name="EmployeeName">15</Field>

  • Using ODBC how do you identify a calculated column in a table?

    I've a calculated column in my table. Is there a way to identify that column through ODBC functions? I need to identify the  calculated column and make it read only. The function should support both SQL and Access databases. Please let me know if
    there is a way to find out this column type.

    Hello,
    You can refer to the following article which list some ODBC Scalar Functions which you can used in the T-SQL query statement.For example
    SELECT {fn TRUNCATE( 100.123456, 4)};
    -- Returns 100.123400
    Reference:http://msdn.microsoft.com/en-us/library/bb630290.aspx
    As per my understanding, there is no built in declarative support for read-only columns. You can try to create a UPDATE trigger to achieving this. Or you can create a view with derived column  from the source table. And then users cannot
    update this calculated column on the view.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • "Person or Group" Field in List instance (Schema.xml)

    hi all,
    I created new List instance and I added new Field Employee to the list instance. The Employee field  in the Schema.xml is like:
    <Field Name="Person" ID="{f3c1416f-69dd-4172-b05f-5df45c86ee56}" DisplayName="Person" Type="UserMulti" Mult="TRUE" /></Fields>
    and this work fine.
    But I cant see the EntityEditor like below pic:
    they are disapear.
    Can anyone maybe help me?
    P.S.  I created one column via UI on the same list and in the SharePoint Manager 2013.
    Its the same I dont see the EntityEditor and here is the Schema.xml for the test column:
    <Field Type="UserMulti" DisplayName="test444" List="UserInfo" Required="FALSE" EnforceUniqueValues="FALSE" ShowField="ImnName" UserSelectionMode="PeopleAndGroups" UserSelectionScope="0"
    Mult="TRUE" Sortable="FALSE" ID="{aefd55b0-3d3e-44ba-a649-82391061ca38}" SourceID="{93681c67-ca5f-4598-a412-3efee82a18d6}" StaticName="test444" Name="test444" ColName="int3" RowOrdinal="0"
    />
    thank you in advance
    BR
    Ahmad

    Hallo Mr. Sabir,
    sorry I was sick and I couldn't answer you before :-(.
    I use SP 2013 (and not SP 2010, maybe I must Active a feature!) and in my Schema.xml I have exacly the Schema:
     <Field Name="Person"
                 ID="{f3c1416f-69dd-4172-b05f-5df45c86ee56}"
                 DisplayName="Person"
                 Type="User"
                 Required="FALSE"
                 ShowField="ImnName"
                 UserSelectionMode="1"
                 UserSelectionScope="0"
                 Group="Custom Columns"
                 StaticName="MyUserColumn"
                 />
    srv206/Lists/CustomList/NewForm.aspx
    when I open the above URL  I get like below picture:
    if you or other one here have/has an advice or other idea thanks in advance
    BR
    Ahmad
    SP 2013 & SPD 2013 & VS 2013 & MSSQL 2012

  • Person or Group MetaData Field not saving

    I have a document library with a custom content type
    This DL has 2 Person or Group Meta Data Fields
    I created a simple workflow so that the people on these 2 fields get notified when an item is created or modified. 
    However; for some reason, when I create a new document set of this content type 
    The person fields dont save any information
    I can edit and reenter the info and it saves it but no workflow emails go out. 
    I am using Sharepoint Online on a E3 plan. 
    Please help
    Thanks
    Tanya

    Hi,
    I have done a test on my SharePoint online, I can’t reprocess your issue.
    I added a custom content type in a document library which has 2 Person or Group Fields.
    Then opened the document library with SharePoint Designer 2013, created an approval workflow as the following screenshot:
    I  selected that starting the workflow when an item is created or modified.
    When I created or modified an item in the document library, the people on these 2 fields got emails 
    automatically.
    For your issue, make sure the  people have correct email addresses.
    Please follow my method and test again.
    Hope it helpful.
    Best Regards,
    Lisa Chen

  • Using Authorization group field in Data entry profile

    Hi,
    I would need some help in configuring/using the authorization group field in data entry profile.
    After setting up the values in the drop down, how do we link to the authorization profiles or roles .
    basically, I would like to know the steps/activities required to use this field

    cross posting->thread locked.

  • User Profile Sync - Fields That Appear Under the "Person or Group" Column

    As I go to add a new column to a list on SharePoint 2010, I notice some fields under the drop down labeled "Show field". Inside that drop down there is a "Test" and a couple others I see in there that I don't notice in the User Profile
    Sync. Forgive me, I've inherited this SharePoint config. Where should I be looking to find these phantom fields or how can I erase them?
    Thank you!

    Those fields are part of the schema for the "Person or Group" field type and are not related to the UPS.
    Trevor Seward, MCC
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Javascript client object model : get value of person or group multi value field (need the username)

    How to get value for a Person or Group field which is of multi value?
    Below is my code:
     var _Assigned = "";
                if (appPendItem.get_item("Assigned").length > 0)
                    if (appPendItem.get_item("Assigned").length ==1)
                        _Assigned = appPendItem.get_item('Assigned').get_lookupValue();
                    if (appPendItem.get_item("Assigned").length >1)
                        for (var i = 0; i < appPendItem.get_item("Assigned").length; i++) 
                            _Assigned = _Assigned + appPendItem.get_item("Assigned")[i].get_lookupValue() + ";";
    I am getting error :  Object doesn't support property or method 'get_lookupValue'
    Please suggest how to do this.
    Thanks

    I tired this code, works perfectly for me:
    var itemId = 3;   
    var targetListItem;
    function runCode() {
        var clientContext = new SP.ClientContext(); 
        var targetList = clientContext.get_web().get_lists().getByTitle('XYZ');
        targetListItem = targetList.getItemById(itemId);
        clientContext.load(targetListItem, 'Users');        
        clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    function onQuerySucceeded() {
        var users = targetListItem.get_item('Users');
    for(var i = 0; i < users.length; i++) {
      var userValue = users[i];
      console.log(userValue.get_lookupValue());
    function onQueryFailed(sender, args) {
        alert('Request failed. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', runCode);
    OutPut:
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

Maybe you are looking for

  • HP Laserjet Pro MFP M126nw printer installation error

    computer display following error msg during installation of LaserJet Pro MFP M126nw printer. I havea system with intel  core 2 Duo with 2 GB Ram, my Os is Window & Ultimate 32Bit. please solve this issue as soon as possible.

  • My Mac Book won't recognize my external hard drive

    I currently have an external hard drive that I'm connecting to a usb port and nothing happens. I can see that the lights on the actual hard drive are on and it's spinning but the mac isn't showing up as an available drive.

  • Upgraded to 10.6.8 now CD/DVD doesnt work in Bootcamp or Parallels??

    It seems upgrade to 10.6.8 broke the connection to my CD/DVD drive. It no longer works in Parallels or Bootcamp. Originally Parallels said it was being used by another program or files were missing. I upgraded Parallels Desktop 5 to version 6 and now

  • MAJOR Problems!!!!

    My 4th Generation Ipod is was constantly freezing, and now I tried plugging it in to my computer, but my computers won't recognize it. My Ipod then only shows either the apple symbol, then A frowning ipod, and when its plugged into the computer it fr

  • An mpg export puzzle

    I have a QT mpg file, exported from FCP 4.5 with the Sorenson 3 codec. A look at "get movie info" confirms that S3 was used. I've made sure that all relevant audio and video MIME settings in QT are checked.(However, I recently updated to 10.3.9 and Q