Qlik Community

Qlik Sense App Development

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

Announcements
See why Qlik is recognized as a Leader for the 10th year in a row – and discover how Qlik can help put your business in the lead. Get Report
Highlighted
caseyjohnson
New Contributor III

Creating Dynamic URL in Load Editor (Almost There?)

Trying to get info from a Web File Data Connection that needs a dynamic URL. I'm almost there but I'm only able to get the first page of results. The script is reading the dynamic url from the table, but it's not moving on to the next URL. I'm trying to get data from the first (2) pages of data from each different URL may have (few to many). Here's what I have (thanks to this thread ["Load" within a for loop with passing dynamic v... | Qlik Community]‌). I think I'm close and my issues are in the For statements?

[Table A]:    // has the info needed for the dynamic url

LOAD

"Field A"

FROM [ .....]

(...);

For x = 1 to NoOfRows('Table A')-1

Let fieldA = FieldValue('Field A', $(x));

For i = 1 to 2 step 2 // to toggle through first two pages, think this is my issue ??????

[Table B]:

"Field B",

"Field C",

'$(fieldA) // want this info in data output

FROM [lib:// ....]

(url is [http://www.abc.com/search/$(fieldA)/page=$(i)] html, embedded labels, table is @3);

Next i;

1 Solution

Accepted Solutions
Highlighted
caseyjohnson
New Contributor III

Re: Creating Dynamic URL in Load Editor (Almost There?)

Got this to work for one variable, not the multiple variables (for pages yet).


[Table A]:    // has the info needed for the dynamic url

LOAD

"Field A"

FROM [ .....]

(...);

For each x in FieldValueList('Field A')

For x = 1 to NoOfRows('Table A')-1

Let fieldA = FieldValue('Field A', $(x));

For i = 1 to 2 step 2 // to toggle through first two pages, think this is my issue ??????

[Table B]:

"Field B",

"Field C",

'$(fieldA) // want this info in data output

FROM [lib:// ....]

(url is [http://www.abc.com/search/$(x)/page=1] html, embedded labels, table is @3);

Next x;

View solution in original post

1 Reply
Highlighted
caseyjohnson
New Contributor III

Re: Creating Dynamic URL in Load Editor (Almost There?)

Got this to work for one variable, not the multiple variables (for pages yet).


[Table A]:    // has the info needed for the dynamic url

LOAD

"Field A"

FROM [ .....]

(...);

For each x in FieldValueList('Field A')

For x = 1 to NoOfRows('Table A')-1

Let fieldA = FieldValue('Field A', $(x));

For i = 1 to 2 step 2 // to toggle through first two pages, think this is my issue ??????

[Table B]:

"Field B",

"Field C",

'$(fieldA) // want this info in data output

FROM [lib:// ....]

(url is [http://www.abc.com/search/$(x)/page=1] html, embedded labels, table is @3);

Next x;

View solution in original post