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: 
Anonymous
Not applicable

Variable in Load Script

in my Load Script;

UserAll:

LOAD distinct User

FROM

[..\Qlik\Audit_MM-QV01.log]

(txt, utf8, embedded labels, delimiter is '\t', msq);

let vUsers= NoOfRows('UserAll');


FOR i = 0 to $(vUsers)

  SET vLogUsers$(i)=' ';

NEXT

on my front end i created a variable vLogonUsers :- concat(User,',') this list All the users separated by a comma

now on the second part i want to create variables vLogUsers$(i)

itried

SET vLogUsers$(i)=' peek(User,$(i),UserAll');    not working


please if there could be a way to do this in the load script


in  front end i can manually have vLogUser1 :-  subfield(vLogonUsers,','1) as so on


but  i want o do it in the load script since the number of users can grow periodically

thanx in advance

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

i got it my syntax had wrong quotes

this worked for me

let vLogUsersNames$(i)= peek('User',$(i),'UserAll') ;

View solution in original post

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Check the red SET statement for awkwardly positioned quotes...

The syntax specification requires you to quote both the field name as well as the table name. But I'm not entirely sure what your shortcut is trying to accomplish here.

Anonymous
Not applicable
Author

i got it my syntax had wrong quotes

this worked for me

let vLogUsersNames$(i)= peek('User',$(i),'UserAll') ;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

That's what I meant.

Good luck, Peter