How do I create a bot action that goes "one-way" on changes to a slice?

Hi,

Need your help to make a “one-way” notification bot:

I have a slice that displays a list of students waiting to be assigned a mentor. It is set up like this:

OR([mentor_name]="Mentor TBD", [mentor_name]="")

When [mentor_name] is changed (to a real name), that student automatically is moved off of that list.

The bot in question currently sends out an email when a 'mentor_name" is changed. I did this using a comparison expression:

[_THISROW_BEFORE].[mentor_name] <> [_THISROW_AFTER].[mentor_name]

It works, except, on rare occasions, when a student’s mentor is switched back to “Mentor TBD” and the student is automatically back on the list (slice), the bot is also triggered.

So I would like to modify the comparison expression so that the email goes out ONLY when [mentor_name] goes from “Mentor TBD” to something else, not the other way round.

How do I do that?

AND(

[_THISROW_BEFORE].[mentor_name] <> [_THISROW_AFTER].[mentor_name],

[_THISROW_BEFORE].[mentor_name] = “Mentor TBD"

)

3 Likes

Worked like a charm! Thanks!

1 Like