You are not providing enough information for me to tell you if there is a better way. "Get Rows Where" is very efficient, unless you are using it a lot. It does a complete pass through the data to get its results. If you are doing this a lot, it might be better to use a different method that reduces the number of full data scans.
You stated that using As Column() is slower than using a direct reference to a Column Name. If that is what you have determined, you could change your code to the following. It will pass to JSL a hardcoded version of your Get Rows Where().
Thanks @txnelson ! Yes, it is being called like 50 or more times and that depends on the number of combinations of wafer, temperature and vcc (added). I got the same performance using the code above. In fact I also tried doing
main_dt:Eval(G_TEMP_COL_STR) == M_TEMP
but it is still noticeably slower compared to doing
:temperature = M_TEMP
I think it must be the evaluation string that is slowing it down.
I did "lazy/lousy" workaround, I kept the
Get Rows Where( :temperature == M_TEMP ...)
And renamed the column I selected in the GUI to temperature to match it.
As Column(dlg_ret) << Set Name( "temperature" );
It works fast as expected but renames the column names.
The example given by @txnelson can be simplified (IMO) by also using the EvalInsert function: this allows variable substitution based on the caret (^) symbol. Additionally the notation \[ ...]\ can be used so that quotes can be used without having to use escape sequences. So ultimately it's possible to write: