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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

For loop help

Hi,

Can any one please help me on below requirement.

I am connecting to the below Url using Rest API Connector which is like below

https://api-runtime-if-abdf:8082/ab/vh/hy/bhjn/v1/refdatasets/HBJIOOJK/latest

to connect to above url created one connection

in the same URL only the table name Is changing like below

https://api-runtime-if-abdf:8082/ab/vh/hy/bhjn/v1/refdatasets/GBHJIL009/latest

Like this there are 90 URL's in all these URL's  only the table name which is highlighted in red color is changing. is there any way to pass the parameters in one connection using for loop instead of creating number of connections for each URL.

Please help me on this.

 

Thanks in advance

 

 

 

1 Reply
DavidM
Partner - Creator II
Partner - Creator II

Do you have the list of the table names? I suggest creating table with all the 90 names and the passing those to variable. Something like this (Loading_Tables is the table with names of your table).

Loading_Tables:
Load
count(Table) as MaxRowNo
resident Loading_Tables;

// this is to get number of iterations

vTableCount = num(peek('MaxRowNo',0,'Loading_Tables'));

for a=0 to $(vTableCount)-1

LET vTableName = peek('Table','$(a)','Loading_Tables');

Then load it using the link with variable:

 https://api-runtime-if-abdf:8082/ab/vh/hy/bhjn/v1/refdatasets/"$(vTableName)"/latest

Next a;

Hope this helps