Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Appending rows to a table in a loop

This is frustrating me more than it reasonably should, but here is my problem:

I am trying to append rows in a table within an IF..ELSEIF..END IF loop. I have tried several variations and the latest that made sense is this (dummy code):

INLINE_TABLE_TO_BE_APPENDED:

Load * inline [

Col1, Col2, Col3

'AA','BB','CC'

];

//loop

for i=0 to <some number>

  <business logic that calculates 3 variables>

   ...

  </business logic that calculates 3 variables>

  

   Var1 = 'DD';

   Var2 = 'EE';

   Var3 = 'FF';

  

INLINE_TABLE_TO_BE_APPENDED:

Load

  Var1,

   Var2,

   Var3

Autogenerate 1;

next

I would expect the INLINE_TABLE_TO_BE_APPENDED to look like this after a few iterations of the loop..:

Col1, Col2, Col3

'AA','BB','CC'

'DD','EE','FF',

'44','55','66'

'blah','meh','moo'

...

Instead I am greeted with a "missing/msplaced FROM" error and I just can't see it.

The idea is to append rows to a table in a loop, this approach may be totally wrong, so please feel free to push me in the right direction.

Any help is really appreciated!

Community Browser