Bot firing when it should not (when field being checked for change is left blank)

I have a bot that sends an email notification when the field/column named “Mentor” is changed from its current value. The event is type “Data Change” on “Updates Only”. The formula in the “Condition for event” field is:

[_THISROW_BEFORE].[mentor]<>[_THISROW_AFTER].[mentor]

This normally works fine and we get the email when somebody changes the value of the mentor field as expected. The problem is when it is blank, the bot is triggered and we get the email saying the mentor has changed even if it hasn’t been. In other words, if the mentor field is blank, the bot is triggered for any change to the record, even if mentor is left alone. Is this a glitch, or is there something I’m missing here? Thanks!

I will add that if I run a test on the expression, I get weird results where it evaluates to “true” anywhere the mentor field is blank, which makes no sense.

1 Like

I am stuck in a similar situation…just posted the question here yesterday. https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/ChangeCounter-Automation-Question/m-p/526702#M204209

Configure data processing - AppSheet Help

1 Like

@Steve Thank you sir, I can appreciate how that article impacts what my expression is “doing”, but I’m at a loss how to deal with it. If in all cases blank=blank is true, my expression should evaluate to false when the mentor field is left blank, because it is still blank. The expression is evaluating if the value of the field is the same as it was before the update process started, which it is. This helps my “test” output make sense, but not the real-world execution. It should only fire when the value changes. I’m guessing I’m failing to understand something here? At the end of the day, the app in question is set to “Legacy”, will switching to “Consistent” likely solve my issue?

Give it a try and find out.

1 Like

I suppose you have a point. :sweat_smile: Just trying to make sure I don’t have any “unintended consequences”…

1 Like

It could only improve your situation, I’d expect.

1 Like

This appears to have resolved the issue, output of test yields “false” across the board and initial live tests appear correct. Thank you!

1 Like