Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
caseyjohnson
Contributor III
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
caseyjohnson
Contributor III
Contributor III
Author

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
caseyjohnson
Contributor III
Contributor III
Author

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;