Problems with [_THISROW_AFTER] and [_THISROW_BEFORE]

Hi, my name is Andrés. I currently have an application in which I track flights for the company I work for.

Overall, it works very well, but I have an issue when trying to do the following:

I have a function that checks whether a crew member has been modified in order to notify them if they have been assigned or unassigned from a flight. For this, I use [_THISROW_AFTER] and [_THISROW_BEFORE].

The problem is that I'm not getting the email addresses of these people correctly. I'm attaching some code I use for debugging and the email I'm receiving (I've shortened the emails for security reasons).

 

andresomza_0-1745438438480.pngandresomza_1-1745438458529.png

 

Solved Solved
1 9 172
2 ACCEPTED SOLUTIONS


@andresomza wrote:

I updated my debug formula, and the strange thing is that it works outside of the lookup:


Thank you for the update. In that case you could pull the emails in the tables only if possible rather than pulling them through LOOKUP() in the template.

 

View solution in original post

Hi Suvrutt,

Thank you for your patience and continued help.

I just double-checked, and actually yes — the crew fields (like "Piloto") are set up as Ref type columns.

Given that, and based on your suggestion, I realized I don't need to use LOOKUP() inside the bot at all.
Instead, I can simply dereference the Ref field to access the related email directly, like this:

[_THISROW_BEFORE].[Piloto].[Email]

[_THISROW_AFTER].[Piloto].[Email]

This approach is much cleaner and avoids the need for extra virtual columns or complicated lookups.

Thank you very much again

Best regards,

View solution in original post

9 REPLIES 9
Top Labels in this Space