Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

I need to change emails in a formula as the person in a user role changes

This sounds odd, but bear with me.

Our team rotates out team leads every 6 months, to build experience and training.  So I am creating a user role that I can just reassign to the new team lead so that the team lead workflow and history is carried by the role not the user.

To that extent, I want to create email notifications that trigger off when a team member finishes a milestone in the project.  The problem is I don't want to have to hard code an email address, instead I want to hard code the team lead.  The problem I have is I don't see how to select a user's role, and therefore the email associated with the team lead.

Hopefully that makes sense.  Anyway any thoughts?
  • Formulas cannot see Roles.  You will need to have a record somewhere to record the Current Team userid and look that up down to the task records.
  • There are a couple of ways to do this that are pretty straightforward.  I create my own 'user' table in every app that i build which can be used for a myriad of things.  However, if you want to just track this one 'user' role, create a table called 'settings'  (or whatever you want).  Add a user field called 'current team leader'.  Create one record, and one record only for this table.  

    The record ID, if you only create one record, should be '1'.  Create a relationship to this table from your tasks or milestones table.  For the value 'related setting', set the default value to '1'.  

    From this point on, whenever you change the 'team leader' user in the 'settings' table, it will be reflected in all the other tables that you relate to 'settings'.  You then set the email notifications to the email address of the 'related setting - team leader'.