Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
evgeniyita
Creator
Creator

How to use a loop through tabs in the load script editor

Hello guys,

I've got few tabs in the QV load script editor which I need to load one by one. And I need to use a loop through these tabs.

I don't want to keep all code in one tab. Is it possible to use the same loop through the existing tabs ?

With my best regards,

Evgeniy

1 Solution

Accepted Solutions
micheledenardi
Specialist II
Specialist II

Ah ok... sorry...

i think the best approach is to use sub() and call()...  so:

Tab1:

sub tab1

     //your tab1 script

end sub


Tab2:

sub tab2

     //your tab2 script

end sub

Tab3:

For i = 0 to N

     Call tab1;

     Call tab2;

next

View solution in original post

4 Replies
micheledenardi
Specialist II
Specialist II

Maybe something like this:

TableName:

Load * Inline [

Table

Tab1

Tab2

Tab3

Tab4

Tab5

Tab6

];

For i=0 to NoOfRows('TableName')-1;

    let vTable =peek('Table',i,'TableName');

    '$(vTable)':

    SELECT

    *

    from $(vTable);

next

drop table TableName;

evgeniyita
Creator
Creator
Author

thanks for the quick response but I mean ...I need something like this:

Tab1:  //a tab in the load script editor (not a table)

For i = 0 to N

Table1:

load * from ...

Tab2:

Table2

load * from...

NEXT

micheledenardi
Specialist II
Specialist II

Ah ok... sorry...

i think the best approach is to use sub() and call()...  so:

Tab1:

sub tab1

     //your tab1 script

end sub


Tab2:

sub tab2

     //your tab2 script

end sub

Tab3:

For i = 0 to N

     Call tab1;

     Call tab2;

next

View solution in original post

evgeniyita
Creator
Creator
Author

Thank you very much. It's a nice solution