Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
lmenendez_grupo_pinero
Contributor III
Contributor III

for ... next with a list of values

Hi every body,

I wonder is someone have a little exemple of using a for-next loop using a list of values instead a correlative numbers.

for exemple I need the variable 'n' takes the values 'ACG' , next 'BPJ', next 'HJP'...

 

Thanks

Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

3 Replies
hic
Former Employee
Former Employee

For each n in 'ACG' , 'BPJ',  'HJP'
...
Next n

 

See more on https://community.qlik.com/t5/Qlik-Design-Blog/Loops-in-the-Script/ba-p/1473543

lmenendez_grupo_pinero
Contributor III
Contributor III
Author

Thank you Henric,

do you know the sintaxis to avoid  "Field not found error Field 'ICO' not found"

in this script?

FOR EACH EMP IN 'ICO','HJP'

temp:
LOAD
$(EMP) AS EMPRESA,

...

lmenendez_grupo_pinero
Contributor III
Contributor III
Author

Sorry I see the solution in your bolg '$(EMP)' AS EMPRESA.

 

Thank you very much