Qlik Community

Qlik Sense App Development

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

pauldamen
Contributor II

Make URL in WITH CONNECTION dynamic

All,

I have a JSON load script with an URL. I need to make the URL dynamic in order to change the skip and take.

First step is that I tried to create a variable with the link. But that doesn't seem to work, whatever I try; in the WITH CONNECTION it doesn't seem to recognize my variable. How you guys can help me out.

REgards, Paul

let vURL =  "https://xxxx.nl/xxxxx/connectors/xxxxx?skip=0&take=5000"

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

...,

...,

...

  "__FK_rows"

FROM "rows" FK "__FK_rows")

FROM JSON (wrap on) "root" PK "__KEY_root"

WITH CONNECTION (url $(vURL));

1 Reply
Stellan_Ronnkvist
New Contributor II

Re: Make URL in WITH CONNECTION dynamic

Hello Paul,

I managed to change the URL like this by adding " " around the URL variable:

//Build new URL.

LET vURL = 'https://api.www.abc.com/external/folder/folder/data/login?accesskey=123;

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

...

  "__FK_rows"

FROM "rows" FK "__FK_rows")

FROM JSON (wrap on) "root" PK "__KEY_root"

WITH CONNECTION

( URL "$(vURL)");


Regards,

Stellan

Community Browser