O$5 - $loadcols - loading list values without 'Set Current List'
Michael Monschau
michael at brainydata.co.uk
Thu Mar 12 13:46:33 EDT 2015
Hi Bruno,
Also keep in mind performance if that is important to you. I cover this in my notation session at EurOmnis but...
Calculate variable as iList.column_name
is one of the slowest forms of accessing a list column
Calculate variable as iList.Cn
where n is the column number is faster, but you need to know the column number
Do iList.$loadcols(,,,field)
is fastest, but again you need to know the column position (the example accesses the 4th column in the list)
If performance is not important, i.e. you don't do hundreds or thousands of iterations or it is part of an interactive interface where the human aspect is slow anyway, stick to the first option as this guarantees code integrity if the order of the columns change.
Regards,
Michael
Michael Monschau (Director)
Brainy Data Limited
Reply To: michael at brainydata.co.uk
Phone: +44 (0)870 474 0708
Web: www.brainydata.co.uk the home of Omnis Components and Developer Services
> On 12 Mar 2015, at 08:51, Mike Matthews <omnis at lineal.co.uk> wrote:
>
> As Reg says, within the loop, just refer to the field in that line as :
>
> iList.field
>
> This is because the $line of the list has been set by the For.. loop.
>
> Question: Did you leave DF1 and file formats and move to SQL and schemas?
>
> Mike
>
>
>
>
>
>
> Mike Matthews,
> Managing Director, SQLWorks Software Ltd
>
> Tel: +44 (0)1271 375999
>
> Email: mike.matthews at sqlworks.co.uk
>
> Web: www.sqlworks.co.uk
>
> SQLWorks replaces Sage, ACT!, Opera, Access, SAP
>
> On 12 Mar 2015, at 05:18, bub <buppeke at gmail.com> wrote:
>
>> Here we are, 1st Studio question, I love the following construction
>>
>> For iList.$line from 1 to iList.$linecount step 1
>>
>> but how can i load the current values of the current line without using 'Set current List', I tried using variations of
>>
>> Do iList.$line.$loadcols(...) but don't get it work....
>>
>> Thanks
>> Bruno Huyssen
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
More information about the omnisdev-en
mailing list