Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

nayanqlik
New Contributor III

Loop in qliksense

Hi,

To simplying things, assume that I have a rest connector connecting to the following url:      'https://xxxxxxxx&start=0&xxxxxxxxx'  .  If i run as is with start=0, the number of records extracted will be 100.  To extract the next 100 records, then start=100.  To extract the 3rd next 100 records, then start=200.  And so on...

Assume there is only 1 field in the data extracted call [Code]

How do I create a loop, to automatically extract the data and each extract to be concatenated with the previous extract and thereafter stored into a qvd.

Currently, there are 765 records, so the extract will only work up to start=700. However the number of records are continually increasing.   How do i account for this as well.

Kind regards,

Nayan

 

  

 

 

5 Replies
b_knuever
Contributor III

Re: Loop in qliksense

for example something like this:

 

let y=0

while

let loop = (y*100)

Restconnection with start=loop

let y  = y+1

loop

nayanqlik
New Contributor III

Re: Loop in qliksense

Hi B_knuever

 

Thank you for your reply.  I've tried your script but i get an error.  In your script, are you missing any syntax's

 

kind regards

Nayan

b_knuever
Contributor III

Re: Loop in qliksense

It was not a complete script. just something to get you going. lookup the while loop there are some great examples on the help page.

nayanqlik
New Contributor III

Re: Loop in qliksense

Thanks Knuever.

I've managed to find a solution.  What happen was I was getting an error where even though I had the word "next;" after the exit script.  So  i removed the word "next;", then it worked.

Kind regards,

Nayan

 

 

b_knuever
Contributor III

Re: Loop in qliksense

For a while loop you need a loop. with a for each loop you need next at the end
Community Browser