SOLVED

Calculated Column to Return Email Address

%3CLINGO-SUB%20id%3D%22lingo-sub-1505260%22%20slang%3D%22en-US%22%3ECalculated%20Column%20to%20Return%20Email%20Address%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1505260%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%20I%20have%20a%20SharePoint%20Document%20library%20that%20has%20a%20column%20called%20%22Manager%20Responsible%22%20that%20is%20a%20'Choice'%20dropdown.%20I'm%20trying%20to%20create%20a%20flow%20that%20triggers%20when%20a%20file%20is%20created%20and%20looks%20for%20%22Manager%20Responsible%22%20and%20sends%20an%20email%20to%20the%20Manager%20Responsible%20when%20the%20document%20is%20created.%20However%2C%20the%20Manager%20Responsible%20value%20is%20simply%20a%20name.%20The%20way%20I'm%20thinking%20of%20addressing%20this%20is%20to%20create%20a%20calculated%20column%20that%20returns%20an%20email%20address%20is%20example%3A%20Manager%20Responsible%20is%20equal%20to%20%22Cody%20Harman%22%20then%20return%20%22codyh%40XXXXX.com.%20That%20way%20I%20would%20be%20able%20to%20pull%20the%20value%20of%20the%20calculated%20column%20%22Manager%20Responsible%20Email%22%20and%20inject%20it%20into%20the%20%22Send%20to%22%20in%20the%20email%20flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20help%20with%20writing%20the%20formula%20for%20the%20IF%20OR%20statement%20so%20I%20can%20apply%20it%20to%20the%20calculated%20column%20in%20order%20to%20use%20this%20column%20in%20the%20flow.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20much%20appreciated.%26nbsp%3B%20Thanks%20all!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1505260%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hello All, I have a SharePoint Document library that has a column called "Manager Responsible" that is a 'Choice' dropdown. I'm trying to create a flow that triggers when a file is created and looks for "Manager Responsible" and sends an email to the Manager Responsible when the document is created. However, the Manager Responsible value is simply a name. The way I'm thinking of addressing this is to create a calculated column that returns an email address is example: Manager Responsible is equal to "Cody Harman" then return "codyh@XXXXX.com. That way I would be able to pull the value of the calculated column "Manager Responsible Email" and inject it into the "Send to" in the email flow.

 

I need help with writing the formula for the IF OR statement so I can apply it to the calculated column in order to use this column in the flow. 

 

Any help much appreciated.  Thanks all!

 

 

5 Replies
Best Response confirmed by tomhoffman (Occasional Contributor)
Solution

@tomhoffman Can you just make the 'Manager Responsible' a Person column so that the user has to choose from a full list of actual user accounts? Then you can send emails to them, no problem. I know sometimes users complain having to choose from the entire Active Directory listing (although I really don't understand why).

But failing that, I would try syntax like this:
=IF([Manager Responsible]="John Smith", "john.smith@email.com")

 

I think you can just put a comma at the end and keep adding new IF statements. You'll just have to make sure you get the number of closing parentheses right at the end. If there are only a small handful of manager names, I guess this would work. But this method is limited and means you'll have to maintain it whenever managers change. Choosing from a Person column would be better!

@racrig, thx for the reply. If I use the single example you provided it works fine. However, I can't seem to get it right if I add multiple entries to the list. I tried multiple variations in syntax too. Does it need an 'Or' statement? Thx

@tomhoffman  in your SharePoint list make sure you have a column that has the email address of the worker. Then in the flow use an Office 365 Users Get manager (V2) action to get that worker's manager. I'd post up some screenshots but I'm about to go into a meeting.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Thing is it's not always the actual manager of the document creator that the email needs to go to

@tomhoffman This worked for me in a test:

 

=IF([Manager Responsible]="John Smith","john.smith@email.com",
 IF([Manager Responsible]="Joe Jones","joe.jones@email.com",
 IF([Manager Responsible]="Jane Doe","jane.doe@email.com")))

So commas in between options, and close ALL parentheses at the very end. If I put in a Manager name that isn't accounted for in the calculated Email column, it just plugs the word No in there. But again, I recommend just making people choose from a Person column. Low maintenance for you!