function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aaqib Niaz 5Aaqib Niaz 5 

I have a field with comma separated values in it basically the values are user names. I have to create a custom field which populates their email address. How is that possible?

Hara SahooHara Sahoo
We have to do with Apex, out of the box solution might not be helpful in this scenario.
Convert the field (comma separated values) into a List<String>
Iterate the derived list<string> to get the email address from the User record.
Update the field with the email address

String name = 'name1, name2, name3, name4';
List<String> lstName = name.split(',');