Scope of $variable in Let statement in Calculated Field

This can also happen when using the Data Viewer: Overriding Variables using the Data Viewer

And applies to Custom Functions as well.

hey @MonkeybreadSoftware - would it be possible to create a feature to audit our calc fields and scripts?

Warning: Table::FIeld is a calculated field which uses $variable names, which could have unexpected side effects. Consider rewriting the calcuation using plain variables instead.