Skip to main content
August 7, 2023
Question

Expression rule for Email Address

  • August 7, 2023
  • 2 replies
  • 0 views

Hi All

I have a CDT  in which the data is saved liked that:

id interger 
name varchar
managerteamid integer
s1assigne varchar
s2assigne varchar
s3assigne varchar
s4assign varchar

Now I want to get email Address which is in this manager  Team id and all the assignees and then send the email to all . 

How to write the expression to find the email Address for that and also help me how to write in send email smart service ?

Thanks 

2 replies

mikes0011
Brainy
August 7, 2023

There's a lot of detail left out here (how your users are set up, etc), but in general, if you start with an Appian username, you can get their email address (in plaintext) by using the "user()" function, i.e. user("myUsername", "email") (where "myUsername" is any given user's actual username).  Note that you need to wrap any plaintext email address(es) in "toEmailAddress()" before it'll work in the Send Email node; alternatively, you can set the "to" field to point to an entire Appian Group and/or actual Appian Users and it will generally just work.

August 7, 2023

For Manger Team id field passing the group id(1234) in db and for assign passing the username like "johnmark". Could to help me how to set "to" field in email smart services and the email trigger to all the team member as well as assignees who has worked on that particular task/request