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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

for each in Field

Hi!

Is there a way iterating throug the records of a Field?

Like this:

LoadYears:
LOAD * INLINE [
LoadYear
2010
2005
2004
2003
2002
1998];

for each vYear in LoadYear

..do somethis with vYear;

next vYear

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi

I've used something like this successfully in the past:

Let noOfRows = NoOfRows('LoadYears');
for row= 1 to $(noOfRows)
let vYear=fieldvalue('LoadYear', $(row));
..do something with vYear;
next

Hope it helps

/Fredrik

View solution in original post

1 Reply
Not applicable
Author

Hi

I've used something like this successfully in the past:

Let noOfRows = NoOfRows('LoadYears');
for row= 1 to $(noOfRows)
let vYear=fieldvalue('LoadYear', $(row));
..do something with vYear;
next

Hope it helps

/Fredrik