Renaming Field, there is a possibility of breaking the link with scripts or calculations, running ExecuteSQL.
I've been thinking about this trick a lot too. There's a design function called GetFieldName that has some useful documentation. I have yet to test and see if you can dynamically change a field, but I think That should get you on the right track. Maybe GetFieldName ( Evaluate ( table::field ) ). the problem you're trying to solve is that if someone ever changes the name of field-x to field-y, then you want it to propagate throughout your code right? And if you have it in an executeSQL statement, it wouldn't catch because the field is being passed in as a text object.
This is exactly what we use at my shop. We rarely hardcode an ExecuteSQL statement anymore. Instead it is built via variables in the LET function.
We use a custom function to do the work.
I also use a custom function to make sure renamed fields are correct in ExecuteSQL() statements. The Let() is very powerful (and useful) for setting up these queries!
Retrieving data ...