1

I have a people column. I need to add a calculated column that can give me the domain. This formula =RIGHT([ReportTo],LEN([ReportTo])-FIND("\",[ReportTo])) gives me the name. But I need to get the domain so for contoso\dsmith will show contoso in the calculated column.

I was going to try this formula =LEFT([ReportTo],INT(FIND("\",[ReportTo])-1)) but it looks like I can't use Person or Group type column in the calculated field. Any other suggestion on how to extract the domain name from person column?

6
  • 1
    If you can't use a Person/Group column in a calculated field, then how can the first formula work?
    – MdMazzotti
    May 14, 2015 at 11:50
  • What version of SharePoint?
    – Submits
    May 14, 2015 at 11:53
  • @Submits does it make any difference?
    – MdMazzotti
    May 14, 2015 at 12:05
  • @MdMazzotti I ask because I would consider using CSR in 2013.
    – Submits
    May 14, 2015 at 12:07
  • I see, but sticking to the original question, the answer is still no, you can't use a person field in a calculated field. Any other workaround is, well, just a workaround (to name a few: event receivers, workflows, CSR...)
    – MdMazzotti
    May 14, 2015 at 12:09

1 Answer 1

1

As you cant use the People or Group Column in the formula, i think the workaround is:

  • create another text column
  • create a workflow which will copy the items from people or group column into text column.
  • Now use the Text column in your formula.

You can exclude that column from your view to avoid the misunderstanding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.