Selected Line Only

Das Goravani goravanis at
Sun Jul 10 23:55:36 UTC 2022

> On Jul 10, 2022, at 4:20 PM, Martin Obongita via omnisdev-en <omnisdev-en at> wrote:
> Hi Friends, What is the syntax for "Selected lines only" in the FOR loop statement, For each line in list from 1 to iDataList step 1?

There is no way in the "For" statement to indicate selected lines only.

You should use a repeat loop instead with the command "Go to next selected line" as your last command in the loop, and then you test "Until flag false" and when there are no more selected lines the Go To command will return the flag false. 

Perhaps a better way to do it is to 

Do TempList.$merge(MainList,kTrue) (I think it’s kTrue on second param to do only selected lines, please check this before using)
For TempList.$line From 1 to TempList.$linecount Step 1
  Do your processing - the selected lines are all in this list now
End For

More information about the omnisdev-en mailing list