Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variables inside a xml link

Hey Guys,

I'm running a loop where it calculates part of the xml link. Is there anyway to set the variable inside the link. Here is my test.

SET a=1;
SET b=0;

do while a<2

let c=b+1+200;
let d=b+400;

TempAccounts2:
//LEFT JOIN (TempAccounts)
LOAD *,
$(a)+1&'-'&Key AS %Key2;
LOAD $(b)+200+no as XMLAccountNo2,
text(%Key_row_9E759731840F9D4F) AS Key
FROM [http://website.here&fromIndex=]$(c)[&toIndex=]$(d)[] (XmlSimple, Table is [response/result/Accounts/row]);

OUTER JOIN(TempAccounts)
LOAD
%Key2 AS %Key_row_9E759731840F9D4F,
table2 AS FL%Table,
val2 AS val,
XMLAccountNo2 AS XMLAccountNo
RESIDENT TempAccounts2;

DROP TABLE TempAccounts2;

let a=a+1;
let b=b+200;

loop

1 Solution

Accepted Solutions
Not applicable
Author

Hey Guys, I just needed to remove the [] I added.

SET a=1;
SET b=0;

do while a<2

let c=b+1+200;
let d=b+400;

TempAccounts2:
//LEFT JOIN (TempAccounts)
LOAD *,
$(a)+1&'-'&Key AS %Key2;
LOAD $(b)+200+no as XMLAccountNo2,
text(%Key_row_9E759731840F9D4F) AS Key
FROM [http://website.here&fromIndex=$(c)&toIndex=$(d) (XmlSimple, Table is [response/result/Accounts/row]);

OUTER JOIN(TempAccounts)
LOAD
%Key2 AS %Key_row_9E759731840F9D4F,
table2 AS FL%Table,
val2 AS val,
XMLAccountNo2 AS XMLAccountNo
RESIDENT TempAccounts2;

DROP TABLE TempAccounts2;

let a=a+1;
let b=b+200;

loop

View solution in original post

1 Reply
Not applicable
Author

Hey Guys, I just needed to remove the [] I added.

SET a=1;
SET b=0;

do while a<2

let c=b+1+200;
let d=b+400;

TempAccounts2:
//LEFT JOIN (TempAccounts)
LOAD *,
$(a)+1&'-'&Key AS %Key2;
LOAD $(b)+200+no as XMLAccountNo2,
text(%Key_row_9E759731840F9D4F) AS Key
FROM [http://website.here&fromIndex=$(c)&toIndex=$(d) (XmlSimple, Table is [response/result/Accounts/row]);

OUTER JOIN(TempAccounts)
LOAD
%Key2 AS %Key_row_9E759731840F9D4F,
table2 AS FL%Table,
val2 AS val,
XMLAccountNo2 AS XMLAccountNo
RESIDENT TempAccounts2;

DROP TABLE TempAccounts2;

let a=a+1;
let b=b+200;

loop