Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

While Loop

Hi Guys,

How to print the number 1 to 10 using while loop in qlikview

3 Replies
MK_QSL
MVP
MVP

Load IterNo() as No

AutoGenerate 1

While IterNo()<=10;

sunny_talwar

You should also be able to use RowNo() also:

Load RowNo() as No

AutoGenerate 10;

petter
Partner - Champion III
Partner - Champion III

If you want to do it in a load script and print it to the log window and the log file:

i = 1;

Do While i <= 10

  Trace $(i);

  i = i + 1;

Loop;

or

i = 1;

Do

  Trace $(i);

  i = i + 1;

Loop While i < 10;

If you want to do it in the UI of a running application you can use this expression in for instance a text box:

=Concat( ValueLoop( 1 , 10 ) , Chr(10 ) , ValueLoop( 1 , 10 ) )

   (This is really not a While but could do the same purpose...)