Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

rohitk1609
Valued Contributor II

Nest For loop not working

Hi Techies,

I am using nested loop, where two are my for loop and one is Do while, It only executes once, then second time it get fails and give me me error as The control statement is not correctly matched with its corresponding start statement

               Next a

Temp_0:

load

*

Inline

[

FIELD_CATEGORY

ABC/

CDE/

EFG/

](delimiter is '/');

Let c=1;

FOR c = 1 to  NoOfRows('Temp_0')-1

TEMP:

Load

*

inline

[

FIELD

ABC

DEF

GHI

];

let a=1;

FOR a = 1 to NoOfRows('TEMP')-1

let Var=FieldValue('FIELD',$(a));

let vCountry = SubField(Var,'|',2);

////////Weekly Loop///////

let vToday = num(now())-14;

let b= '42442';

Do while b <= vToday

let vmessage='';

let b=b+7;

Loop

NEXT a

Next c

what I am trying to do, my code first take value from first inline table , then take value from second inline table and then run the weekly loop from a certain date and same repeat for other values from inline table

1 Reply
rohitk1609
Valued Contributor II

Re: Nest For loop not working