0

I have an Assigned To column which look ups emails in a contacts list. What i am trying to achieve is email these set of emails using workflows but because they are not 'Person or Group' i have to make sure the emails are correctly formatted like this:

johndoe@company.com.uk;janedoe@company.com.uk

rather than having commas as separator:

johndoe@company.com.uk,janedoe@company.com.uk

Currently I created a calculated column , i use this formula to replace the commas with semicolons.

=REPLACE([Assigned To],FIND(",",[Assigned To]),1,";")

But this only replaces the first instance of comma, and because Assigned To column does not have a fix number of emails, if it has one email or more than 2 emails, this calculated column will not work and the workflow sending the email will product an error.

If there is more than 2 emails it will only replace the first instance of comma

johndoe@company.com.uk;janedoe@company.com.uk,seandoe@company.com.uk

If there is only 1 email, the column will not change and show up as #Name?

One possible workaround is having IF statement and counting the number of occurrence of ',' and looping for that amount of times. Unfortunately counting occurrence is also not OOTB for calculated columns.

Is there any way i can change all commas to semicolon using OOTB ways?I know using SharePoint Designer 2013 workflows might be able to do this but my company only has 2010 workflows and i have no authorization to download 2013 workflows. I am not familiar with VS so i might need step-by-step guide on VS event receiver etc.

Thanks in advance !!

0

You can still use SP 2010 Workflow to run all those conditions. It should be simpler.

The ideal excel formula should be SUBSTITUTE but that isn't supported. Hence I would get this done in an SP2010 Designer workflow.

0

You don’t need any extra operation to change "," to ";".

In SharePoint Designer workflow, we can return the lookup field as "Lookup Values, Comma Delimited" (works in 2010 workflow and 2013 workflow).

enter image description here

Besides, to enable SharePoint 2013 Workflow platform, you need to install and configure Workflow Manager.

For sending emails to external email addresses, you need to use SharePoint 2010 workflows instead of SharePoint 2013 workflows because of the security enhancement in SharePoint 2013 workflows.

How to send emails to external addresses in SharePoint:

https://blogs.technet.microsoft.com/rajbugga/2013/10/15/sharepoint-2013-unable-to-send-emails-to-external-email-addresses-sharepoint-2013-workflows/

  • Yes, i can use Lookup Values, Comma Delimited. But it only converts my list of emails into johndoe@company.com.uk,janedoe@company.com.uk,seandoe@company.com.uk with commas. I want the separators to be semi colons so that the it will register as AD users and then i will be able to send all the users emails using workflow. If i input the emails with commas as separators it will return a workflow error. – Kev F May 30 '18 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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