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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Peek

Hi All,

What is wrong with the following script. (no syntax error, but garbage error):

Let vDiagnosisCrit = NoOfRows('DiagnosisCrit');
Let vConditions = '';

for i=0 to $(vDiagnosisCrit)
let vConditions = '$(vConditions), ' & peek('DiagnosisCrit_Condition',$(i),'DiagnosisCrit');

next  

Labels (1)
3 Replies
oknotsen
Master III
Master III

No clue on a first glance.

What I suggest is that you add a bunch of TRACE statements to that loop to figure out what the individual variables are on any given moment.

TRACE Loop number $(i);

TRAVE vDiagnosisCrit = $(vDiagnosisCrit )

etc...

May you live in interesting times!
Kushal_Chawda
MVP
MVP

What you are trying to achieve?

marcus_sommer
MVP
MVP

Maybe it's your start with a comma. Instead of:

let vConditions = '$(vConditions), ' & peek('DiagnosisCrit_Condition',$(i),'DiagnosisCrit');

try

let vConditions = '$(vConditions)' & peek('DiagnosisCrit_Condition',$(i),'DiagnosisCrit') & ', ';

- Marcus