Hi everyone
I have a data table with a lot of columns. in my script I name some of them and make a new table to plot the graphs.
the data get updated every day for last 90 days. sometimes in happens that one of the column does not present in the data table in the updated data since it was not running on the tool for a while. the script stops when encounters to naming that non-present column.
How I can make the script continue running and skip that non-present column?
Thanks
You'll want to use the Try() function.
You can read more in the Throwing and Catching Exceptions part of the Scripting Guide.
I just happened to be working on a script that has that exact same problem.
I used the approach the @Jeff_Perkinson referenced above
for (i=1, i<=nitems(fixlist), i++,
try(fixlist[i]<<Set Modeling Type( "Continuous" )); // Try() ignores errors, so if a column isnt there it still runs
try(fixlist[i]<<Set Data Type( numeric));
)