From what you shared, you’re correctly using [_THISROW_BEFORE] and [_THISROW_AFTER] to compare crew assignments (like Pilot, Copilot, TCP 1, and TCP 2) before and after a change, which is a great approach to detect if someone was added or removed.
However, the email you’re receiving shows the same email addresses in both “Before” and “After”, which means the expressions might not be pulling the expected values from before the update.
Likely Cause:
In your expressions like:
LOOKUP([THISROW_BEFORE].[Piloto], “Usuario”, “Key”, “Email”)
AppSheet might not actually resolve [Piloto] from _THISROW_BEFORE properly if the syntax isn’t exact. If you just write [Piloto] inside a LOOKUP without explicitly referencing _THISROW_BEFORE or _THISROW_AFTER, it often defaults to the current row.
Fix:
You should rewrite your LOOKUPs like this:
LOOKUP([_THISROW_BEFORE].[Piloto], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_BEFORE].[Copiloto], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_BEFORE].[TCP 1], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_BEFORE].[TCP 2], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_AFTER].[Piloto], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_AFTER].[Copiloto], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_AFTER].[TCP 1], “Usuario”, “Key”, “Email”)
LOOKUP([_THISROW_AFTER].[TCP 2], “Usuario”, “Key”, “Email”)
That should give you the actual emails from the correct before" and “after” records.