I have a SharePoint list where I use a field Person or Group to enter an Employee's name.

The second column is their email address which I enter manually. Is it possible to fill this field automatically with their email address and how?

有帮助吗?

解决方案

Solution 1:

You can create a workflow or Microsoft flow/power automate to update the Email address field based on the Person or Group field.

Solution 2:

If you are not going to use those email address values later (you don't need to save emails in column) and you just want to show the email in SharePoint list view then you can also achieve it using JSON column formatting.

  1. Create one single line of text column.
  2. Hide it from list forms (make it Hidden from content type settings).
  3. Then use below JSON code to format the column:
{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "div",
   "txtContent": "[$PersonGroupCol.email]"
}

Where PersonGroupCol is internal name of person or group field.

Output:

enter image description here

其他提示

In addition to Ganesh Sanap’s Solution 1, here’s a sample flow for your reference.

enter image description here

There is one dynamic content called PersonGroupCol Email, which you can directly use to update the Email column. (Where PersonGroupCol is internal name of person or group field.)

Not as good as the Solution 2 but it is doable.

许可以下: CC-BY-SA归因
scroll top