Indicate Current User in Email Notification

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Can you use User() on a conditional field in an email notification?

I thought there was a <current user> tag that would be used in a conditional, but can't seem to find what it actually is. Here is the scenario:

I'm setting up an email to update team members but I do not want the person who left the update to receive the email, so my condition is:

[Last Modified By] is not equal to {the user} ____________ (there is no option to pick current user, so I want to include the code for Current User)

Thanks!!

Photo of Leanne

Leanne

  • 262 Points 250 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 60,058 Points 50k badge 2x thumb
The problem is in who you are sending to, as opposed to who is sending,  as its always the current user who is triggering the Notification when they save.  So even with that condition, the Notification will not fire.

Are your team members identified as separate fields or by a User List type field?
Photo of Leanne

Leanne

  • 262 Points 250 badge 2x thumb
The "to" field is actually whomever is listed in two fields, so it looks like:
To (List of Addresses):
[User Field1]
[User Field2]

So if [User Field1] changes the indicated field, they will become the [last modified user] and they will also be the current user, that will remove them from the notification.

This seems to work for me in other scenarios when I say, "Mail To: The person in User Field A" and then  indicate in the conditions, not if [Last Modified By] is in the field [User Field A].

I just really need to know how to indicate <current user>.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 60,058 Points 50k badge 2x thumb
You can set up a formula user field with the formula User().  That will always be equal to the current user.

You will need to have two more fields to use in the to box.

[User field 1 if not last Modified by]

[User field 2 if not last Modified by]

The formula would be

if[User field 1]<>[Last Modified by], [User field 1])
same for the other one.
Photo of Leanne

Leanne

  • 262 Points 250 badge 2x thumb
This seems like a very long work around.
Are you saying that it is not possible to indicate current user in the email notification conditions?

If not, it would probably be easier/faster to create two notifications than all these additional fields. If I were to do that I would just have Email 1 go to User 1 but not if Last Modified is in User 1 field and the same thing for User field 2...I was just hoping to keep it easy with one email notification.

Thanks!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 60,058 Points 50k badge 2x thumb
if you tell the Notification not to fire if the [Last Modified By] = [Current user] it will never fire.  You solution should work too.
Photo of Leanne

Leanne

  • 262 Points 250 badge 2x thumb
Ah ok, point taken. I will go with my other option. Thanks!