1

Can anyone help me with sharepoint formula? What I am trying to do is I have a list column and it has list item

  1. Column Name: user
  2. Type: Choice
  3. Type of Choice: List of names (Eg jack, bob, tom)

Now I need to have a formula which should say,

if I select a user jack send email to jack@xxx.com 
if I select a user bob send email to bob@xxx.com
if I select a user tom send email to tom@xxx.com

Can anyone help me with the formula I should use on the formula tab. Please help. This is in SharePoint 2010.

2

There is no "formula" that can send an email. You can use a formula to calculate a value in a column, and that value can look like an email address. Such a formula might look like

=IF([ChoiceField]="jack","jack@abc.com",IF([ChoiceField]="bob","bob@abc.com","tom@abc.com"))

If you have more than three choices you need to nest more IFs.

If you want to send an email, you will need a workflow. In that case, I would use a separate list with columns for name and email address and in the workflow do a lookup for the email address of the selected name instead of nested IF statements.

3
  • Is there a way to have SP determine user email automatically? Otherwise, for 200 users, I would have to write 200 lines of "If ...X" then select X@abc.com' Any way to automate this? Biggest risk is that as new people are entered, more new lines would need to be added. Thoughts? – Alfatah Kader Nov 30 '16 at 16:26
  • @AlfatahKader Typically you would not use a formula at all. If you use a SharePoint Designer workflow you can use workflow steps to send emails. A person field is all that's required for that if you want to send to individuals, or use AD groups, or use workflow logic to obtain other people like a person's manager. In any case, a person's email is contained in the person field, so that should be your starting point. – teylyn Nov 30 '16 at 19:44
  • yes, I was able to figure that out afterwards, thanks. By the way, do you have experience in writing loop conditionals? I am trying to write 3 separate loops but one of them works. I will post my question if I cant resolve in a day or two on my own. – Alfatah Kader Nov 30 '16 at 22:28
0

Presuming you have a column type as Person or people in your Document Library, List, or Task (or whichever app), if you are working on SharePoint Designer 2013 (you can download it), you should be able to create a workflow and in it, once you set up the IF conditional, for the "then" condition, go to the "Action" menu and from drop down actions:

Step 1: Select Action "Send Email"

Step 2: click to edit the 'users' and click on the book icon of "To" field enter image description here

Step 3: Choose "Workflow Lookup for a User..." and click on ADD enter image description here

Step 4 and 5: From the "Lookup for Person or Group" window, choose the correct source in the source "Field from source"; in my case, the column titled "Dept. Stakeholder" Step 5: Choose "Return field as" field as 'Display Name' and click ok enter image description here

End result should look like this: enter image description here

The above steps created the correct algorithm engine to achieve my goal. In testing phase, I switched users for an assignment multiple times in the Column value in the Document Library. As long as the primary parameters to trigger the workflow met, SP activated the workflow and send out the email.

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.