Hello,
I wrote a relatively simple script that would create a few columns with formulas to calculate some key values.
The script itself works fine, the columns get created and the values get populated.
The issue I am having is that if I then try to sort any column in the dt by either ascending or descending, those columns' created formulas will no longer produce anything. I can tell that the formulas do get reran, as I get an error stating that it does not recognize the name of the columns used in the formula:

Here entCol is the variable for the column name I used in my script.
Is there a way to make sure that the column formulas that I script can be reran successfully if I choose to rearrange the data table?
Thanks,
Lain