Expression help to not send myself an email

Hello,

I am trying to write an expression to send an email if a task is created and assigned to someone else, or an exsisting tasks owner is changed. I have it set to updates & adds.

My isssue is, if you update a task, or create a new task to yourself you are getting the email as well. I only want the email to send if the owner is different after the save, or when creating a new task the owenr is DIFFERENT then the current useremail making the tasks.

I am struggling with the expressions.

The first expression is easy rowbefore.owner <> rowafter.owner
Not sure how to check if its a new task and that im not just making myself a task cause then I wouldnt want an email saying “A task has been assigned to you…by you”

Solved Solved
0 3 104
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

@QREW_Cale, your expression is equivalent to @Brandon_Ekbatani’s original–I would expect it to behave the same.

I would try this:

IF(
  ISBLANK([_THISROW_BEFORE].[Owner]),
  ([Owner] <> USEREMAIL()),
  ([Owner] <> [_THISROW_BEFORE].[Owner])
)

Note that [Owner] and [_THISROW_AFTER].[Owner] refer to the same value.

View solution in original post

3 REPLIES 3

Hey Brandon_Ekbatani,

Would it potentially work if you give it an if() statement to force it to be true if the Owner before and after wasn’t equal?

Like…
if(
[_THISROW_BEFORE].[Owner] <> [_THISROW_AFTER].[Owner],
TRUE,
FALSE
)

I believe if the bot is set up to send an email on an update and this is the trigger expression it should send an email if they don’t equal before and after. If someone has a more clear expression I am open to critique, but that would be my suggestion at least.

Hope that helps,
Cale

Steve
Platinum 4
Platinum 4

@QREW_Cale, your expression is equivalent to @Brandon_Ekbatani’s original–I would expect it to behave the same.

I would try this:

IF(
  ISBLANK([_THISROW_BEFORE].[Owner]),
  ([Owner] <> USEREMAIL()),
  ([Owner] <> [_THISROW_BEFORE].[Owner])
)

Note that [Owner] and [_THISROW_AFTER].[Owner] refer to the same value.

Thank you!

Top Labels in this Space