$loadcols $colcount

Kelly Burgess kellyb at montana.com
Sun Apr 17 21:04:09 UTC 2022

Hi Martin,

> For lLineNum from 1 to  lTableClassColsList.$linecount        
>     Do lTableClassColsList.[lLineNum].$loadcols(lCol01,lCol02,lCol03,lCol04,lCol05,lCol06,lCol07)            
> End For        

It's hard to know what you want to do, since the code above just leaves you with the final line's values in those locals, overwriting the previous line's values.

If you don't supply any parameters to $loadcols, then all columns are loaded, but if you need to redirect into other variables then you can supply names.

One approach could be to set up a string of desired variables first.

  Calculate loadColumns as con('$loadcols(',nam(lCol01),',',nam(lCol02),',',nam(lCol03),')')
  Do lTableClassColsList.[loadColumns]

Another would be to work with a copy of the list so you can $redefine the copy's columns to match your local variable names.

Another would be to address the list columns directly, without loading them into locals.

   Calculate someValue as lTableClassColsList.[curLine].C[curColumn]

.. just to name a few.


More information about the omnisdev-en mailing list