Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
How to print the number 1 to 10 using while loop in qlikview
Load IterNo() as No
AutoGenerate 1
While IterNo()<=10;
You should also be able to use RowNo() also:
Load RowNo() as No
AutoGenerate 10;
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...)