Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Looping through specific values

Hi Folks,

Can you let us know if it is possible in QlikView to loop through particular values in for loop in the script.

Eg: I want to write condition like this

a=x;

b=y;

c=z;

//Basically a, b, c are discrete values

for i= a to c;

..................

................

next

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can do this:

For Each zVar in ('a', 'b', 'c')

  Let $(zVar) = 0;

Next

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You can do this:

For Each zVar in ('a', 'b', 'c')

  Let $(zVar) = 0;

Next

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi

I'm not totally sure of how you wish to use this but you could use;

For each driver in a, b, c

Where driver is used in your script.  So if you wanted to load one at a time for example, the script would be;

For each driver in a, b, c

Load

     *

From [File} where $(driver);

I hope this helps, let me know how you get on.

Regards


Steve

Not applicable
Author

Many Thanks Jonathan and Steve.

Answered exactly what I'm looking for.

I didn't know that for each loop exists in QlikView.

Regards,

Surendra