<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1639045#M26571</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi Lech,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sorry for late reply. This is code that i am using in my generator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let vAPIConnectionNameForGET = "My Newwstand"

let vAPIConnectionNameForPOST = "My Newsstand"

	CUSTOM CONNECT TO $(vAPIConnectionNameForGET);

	CUSTOM CONNECT TO $(vAPIConnectionNameForPOST);

CUSTOM CONNECT TO $(vAPIConnectionNameForGET);

RestConnectorMasterTable: 
SQL SELECT   "Set-Cookie",  "__KEY__response_header" FROM JSON "_response_header" PK "__KEY__response_header"; 
 
[_response_header]: 
LOAD [Set-Cookie] AS [Set-Cookie]

RESIDENT RestConnectorMasterTable WHERE NOT IsNull([__KEY__response_header]); 
 
//Extracts session cookie from the API response 
let vCookieRaw = Peek('Set-Cookie',0,'_response_header');  
let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2); 
 
DROP TABLE RestConnectorMasterTable;  


//NP GET CONNECTION extracts NP Connection ID's

RestConnectionMasterTable:
SQL SELECT  

"__KEY_data",
(SELECT "id","name","appId","__FK_items"
FROM "items" FK "__FK_items")

FROM JSON (wrap off) "data" PK "__KEY_data"

WITH CONNECTION( URL "My Newsstand:4993/api/v1/connections", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000" );

[connection_items]:

LOAD

[id] 	AS [connection_id],
[name]  AS [connection_name],
[appId] AS [connection_appId],
[appId] as %Connection_ID_Key

RESIDENT RestConnectionMasterTable WHERE NOT IsNull([__FK_items]) ;

let vConnectionId = Peek('connection_id',0,'connection_items');

let vReloadMetadataURL = 'My Newsstand:4993/api/v1/connections/'&amp;amp;'$(vConnectionId)'&amp;amp;'/reload';//Compose the URL for the GET call that checks the connection status

let vConnectionStatusURL = 'My Newsstand:4993/api/v1/connections/'&amp;amp;'$(vConnectionId)';

DROP TABLE RestConnectionMasterTable;


//Triggers NP to reload metadata

CUSTOM CONNECT TO $(vAPIConnectionNameForPOST);

RestNPReloadMetadataTable:
SQL SELECT
"__KEY_data"

FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "$(vReloadMetadataURL)", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000");

[metadata_items]:
LOAD 
[__KEY_data] AS [__KEY_data]

RESIDENT RestNPReloadMetadataTable WHERE NOT IsNull([__KEY_data]);


DROP TABLE RestNPReloadMetadataTable;


//NP METADATA STATUS

CUSTOM CONNECT TO $(vAPIConnectionNameForGET);

let vConnectionStatus = '';

DO while (vConnectionStatus &amp;lt;&amp;gt; 'Generated')   

RestConnectionStatusTable:  
SQL SELECT    
"cacheStatus"  FROM JSON (wrap off) "data"

WITH CONNECTION( URL "$(vConnectionStatusURL)", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000");

[connection_data]:  

LOAD
[cacheStatus] AS [connection_cacheStatus]

RESIDENT RestConnectionStatusTable;  

let vConnectionStatus = Peek('connection_cacheStatus',0,'connection_data');  

DROP TABLE RestConnectionStatusTable;  
DROP TABLE [connection_data];
Loop 

//NP GET TASKS = all available Publish Tasks in NP

RestNPTasksMasterTable: 
SQL SELECT  
"__KEY_data",
(SELECT"id","name","appId","__FK_items"

FROM "items" FK "__FK_items")
FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "My Newsstand:4993/api/v1/tasks", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000" );

[task_items]:
LOAD
[id]    AS [tasks_taskId],
[name]  AS [tasks_taskName],
[appId] AS [tasks_appId],
[appId] AS %Task_ID_Key,
[name]  AS %Task_ID_Name

RESIDENT RestNPTasksMasterTable WHERE NOT IsNull([__FK_items]);// AND [appId] = '$(vAppId)';

let vTaskId = Peek('tasks_taskId',0,'task_items'); 

let vPublshTaskURL = 'My Newsstand:4993/api/v1/tasks/'&amp;amp;'$(vTaskId)'&amp;amp;'/executions';

DROP TABLE RestNPTasksMasterTable;



//Triggers NP to publish reports

CUSTOM CONNECT TO $(vAPIConnectionNameForPOST);

RestNPTaskTriggerTable:
SQL SELECT
"__KEY_data"
FROM JSON (wrap off) "data" PK "__KEY_data"

WITH CONNECTION( URL "$(vPublshTaskURL)", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000");

[_post_items]:
LOAD

[__KEY_data] AS [__KEY_data]
 
RESIDENT RestNPTaskTriggerTable WHERE NOT IsNull([__KEY_data]);
 
DROP TABLE RestNPTaskTriggerTable;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2019 14:45:50 GMT</pubDate>
    <dc:creator>Natalija</dc:creator>
    <dc:date>2019-10-23T14:45:50Z</dc:date>
    <item>
      <title>Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627346#M26095</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;I was able to connect my Qlikview to NP API to automatically trigger reload of metadata and then report publishing.&lt;/P&gt;&lt;P&gt;My issue is that not all Publish Task Id's are coming back.&lt;/P&gt;&lt;P&gt;If i follow instructions from "How To Use NPrinting APIs In A Qlik Load Script " and&amp;nbsp; select only one application for testing purposes&amp;nbsp;(in WHERE clause) it works as it should, but when i want to bring all my NP tasks, some of them are empty (example attached). Not sure what to do, as inside webconsole i have those publish task ID's, but it doesn't come from source.&lt;/P&gt;&lt;P&gt;Did anyone had same issue? Is there a limit how many tasks you can import in one go? At the moment i have more or less 51 publish tasks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 20:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627346#M26095</guid>
      <dc:creator>Natalija</dc:creator>
      <dc:date>2020-03-17T20:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627415#M26100</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is actually well documented in official documentation and on community. Default response gets first 50 records. To override this you need to add LIMIT parameter to your connection. See below example where there are 300 users brought in:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM "items" FK "__FK_items")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FROM JSON (wrap off) "data" PK "__KEY_data"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WITH CONNECTION(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;URL "https://nprintingserver:4993/api/v1/users?limit=300&lt;/STRONG&gt;",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;HTTPHEADER "cookie" "$(vCookie)"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// You need to set the limit to the number of users in your NPrinting server for this query to return proper results, by default only the first 50 users are returned by the API and they might not be the one in your group&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 12:35:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627415#M26100</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2019-09-24T12:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627419#M26101</link>
      <description>&lt;P&gt;I also encourage you to review this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://nprintingadventures.wordpress.com/2019/04/08/nprinting-api-qlik-rest-subroutines/" target="_blank"&gt;https://nprintingadventures.wordpress.com/2019/04/08/nprinting-api-qlik-rest-subroutines/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Subroutines don't have limit parameter embeded but this can be easily fixed...&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 12:37:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627419#M26101</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2019-09-24T12:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627478#M26102</link>
      <description>&lt;P&gt;Thank you Lech,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure how did I miss that &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Natalija&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 13:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1627478#M26102</guid>
      <dc:creator>Natalija</dc:creator>
      <dc:date>2019-09-24T13:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1632361#M26306</link>
      <description>&lt;P&gt;Hi Lech,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just a quick additional question to this discussion. I have reports that are build from 10 NP connections. When I am running following script to automatically reload tasks in WebConsole, it only finds one connection to reload metadata and then distributes report. Issue is that I need to reload all 10 of them to send out the report.&lt;/P&gt;&lt;P&gt;Am I missing something? Could you please direct me to any articles/existing blogs regarding same/similar issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Natalija&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 08:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1632361#M26306</guid>
      <dc:creator>Natalija</dc:creator>
      <dc:date>2019-10-08T08:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1632368#M26307</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Are you using my subroutines or have you built your own script?&lt;/P&gt;&lt;P&gt;If you are using my subroutines to answer your question I would need to see your script as I have no idea how you are calling them?&lt;/P&gt;&lt;P&gt;In my subroutines i have this piece of code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//	    GET CONNECTIONS         - This procedure returns Connection Id's based on their name(s)     (Parameters: Connection Name, AppId)

            SUB NP_GetConnections(vNPrintingConnectionName)

                //  Get Connection

                    LIB CONNECT TO '$(vConnection_GET)';

                //  GET ONE, FEW or ALL Connections
                    
                    Let vNPrintingConnectionOneOrAll        =   If('$(vNPrintingConnectionName)'='','ALL','$(vNPrintingConnectionName)');
                    
                    If '$(vNPrintingConnectionOneOrAll)'    =   'ALL'
                        Let vNPrintingConnectionName        =   '*';
                    Else
                        ConnectionListTbl:
                        Load
                            SubField('$(vNPrintingConnectionName)',',') as ConnectionListTbl
                        Autogenerate
                            (1)
                        ;    
                    EndIf

                    Trace Running "$(vNPrintingConnectionOneOrAll)" Connection(s);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code depending on your inputs will reload all connection, or list of connections or one (if you only put name of one connection in it)....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have written your own code i guess it is up to you how you want to solve the metagata generation step...&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 08:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1632368#M26307</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2019-10-08T08:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1639045#M26571</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Lech,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sorry for late reply. This is code that i am using in my generator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let vAPIConnectionNameForGET = "My Newwstand"

let vAPIConnectionNameForPOST = "My Newsstand"

	CUSTOM CONNECT TO $(vAPIConnectionNameForGET);

	CUSTOM CONNECT TO $(vAPIConnectionNameForPOST);

CUSTOM CONNECT TO $(vAPIConnectionNameForGET);

RestConnectorMasterTable: 
SQL SELECT   "Set-Cookie",  "__KEY__response_header" FROM JSON "_response_header" PK "__KEY__response_header"; 
 
[_response_header]: 
LOAD [Set-Cookie] AS [Set-Cookie]

RESIDENT RestConnectorMasterTable WHERE NOT IsNull([__KEY__response_header]); 
 
//Extracts session cookie from the API response 
let vCookieRaw = Peek('Set-Cookie',0,'_response_header');  
let vCookie = TextBetween('$(vCookieRaw)','Secure,','Path=/',2); 
 
DROP TABLE RestConnectorMasterTable;  


//NP GET CONNECTION extracts NP Connection ID's

RestConnectionMasterTable:
SQL SELECT  

"__KEY_data",
(SELECT "id","name","appId","__FK_items"
FROM "items" FK "__FK_items")

FROM JSON (wrap off) "data" PK "__KEY_data"

WITH CONNECTION( URL "My Newsstand:4993/api/v1/connections", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000" );

[connection_items]:

LOAD

[id] 	AS [connection_id],
[name]  AS [connection_name],
[appId] AS [connection_appId],
[appId] as %Connection_ID_Key

RESIDENT RestConnectionMasterTable WHERE NOT IsNull([__FK_items]) ;

let vConnectionId = Peek('connection_id',0,'connection_items');

let vReloadMetadataURL = 'My Newsstand:4993/api/v1/connections/'&amp;amp;'$(vConnectionId)'&amp;amp;'/reload';//Compose the URL for the GET call that checks the connection status

let vConnectionStatusURL = 'My Newsstand:4993/api/v1/connections/'&amp;amp;'$(vConnectionId)';

DROP TABLE RestConnectionMasterTable;


//Triggers NP to reload metadata

CUSTOM CONNECT TO $(vAPIConnectionNameForPOST);

RestNPReloadMetadataTable:
SQL SELECT
"__KEY_data"

FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "$(vReloadMetadataURL)", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000");

[metadata_items]:
LOAD 
[__KEY_data] AS [__KEY_data]

RESIDENT RestNPReloadMetadataTable WHERE NOT IsNull([__KEY_data]);


DROP TABLE RestNPReloadMetadataTable;


//NP METADATA STATUS

CUSTOM CONNECT TO $(vAPIConnectionNameForGET);

let vConnectionStatus = '';

DO while (vConnectionStatus &amp;lt;&amp;gt; 'Generated')   

RestConnectionStatusTable:  
SQL SELECT    
"cacheStatus"  FROM JSON (wrap off) "data"

WITH CONNECTION( URL "$(vConnectionStatusURL)", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000");

[connection_data]:  

LOAD
[cacheStatus] AS [connection_cacheStatus]

RESIDENT RestConnectionStatusTable;  

let vConnectionStatus = Peek('connection_cacheStatus',0,'connection_data');  

DROP TABLE RestConnectionStatusTable;  
DROP TABLE [connection_data];
Loop 

//NP GET TASKS = all available Publish Tasks in NP

RestNPTasksMasterTable: 
SQL SELECT  
"__KEY_data",
(SELECT"id","name","appId","__FK_items"

FROM "items" FK "__FK_items")
FROM JSON (wrap off) "data" PK "__KEY_data"
WITH CONNECTION( URL "My Newsstand:4993/api/v1/tasks", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000" );

[task_items]:
LOAD
[id]    AS [tasks_taskId],
[name]  AS [tasks_taskName],
[appId] AS [tasks_appId],
[appId] AS %Task_ID_Key,
[name]  AS %Task_ID_Name

RESIDENT RestNPTasksMasterTable WHERE NOT IsNull([__FK_items]);// AND [appId] = '$(vAppId)';

let vTaskId = Peek('tasks_taskId',0,'task_items'); 

let vPublshTaskURL = 'My Newsstand:4993/api/v1/tasks/'&amp;amp;'$(vTaskId)'&amp;amp;'/executions';

DROP TABLE RestNPTasksMasterTable;



//Triggers NP to publish reports

CUSTOM CONNECT TO $(vAPIConnectionNameForPOST);

RestNPTaskTriggerTable:
SQL SELECT
"__KEY_data"
FROM JSON (wrap off) "data" PK "__KEY_data"

WITH CONNECTION( URL "$(vPublshTaskURL)", HTTPHEADER "cookie" "$(vCookie)",QUERY "Limit" "1000000");

[_post_items]:
LOAD

[__KEY_data] AS [__KEY_data]
 
RESIDENT RestNPTaskTriggerTable WHERE NOT IsNull([__KEY_data]);
 
DROP TABLE RestNPTaskTriggerTable;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 14:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1639045#M26571</guid>
      <dc:creator>Natalija</dc:creator>
      <dc:date>2019-10-23T14:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik NPrinting APIs inside a QlikView load script does not bring all Publish task ID's</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1639277#M26601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48794"&gt;@Natalija&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well in your script you are loading all connections to&lt;STRONG&gt; connection_items&lt;/STRONG&gt;&amp;nbsp;table but you are only picking first connection as per this script (which i have found in your logic)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let vConnectionId = Peek('connection_id',0,'connection_items');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my scripts I loop through all rows in the &lt;STRONG&gt;connection_items&lt;/STRONG&gt;&amp;nbsp; table. My table connection_items table is created like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;                    connection_items:
                    LOAD 
                        RowNo()         as connection_row_no,
                        id 			    as connection_id,
                        name 			as connection_name,
                        appId 		    as connection_appId
                    RESIDENT 
                        RestConnectionMasterTable
                    WHERE 
                        NOT IsNull(__FK_items) 
                        AND appId = '$(vAppId)'
                        and (Exists(ConnectionListTbl,name) or name like '$(vNPrintingConnectionName)')
                    ;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In NPrinting.qvs search for subroutines:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;SUB&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;NP_GetConnections(vNPrintingConnectionName)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;SUB&lt;SPAN&gt;&amp;nbsp;NP_ConnectionReload(vNPrintingConnectionName&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;vNP_ReloadDuration)&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;you will see that&amp;nbsp;&amp;nbsp;NP_ConnectionReload subroutine has this bit where all i go over each line based&amp;nbsp; on connection_row_no field....&lt;STRONG&gt;"FOR Each vRowNo in FieldValueList('connection_row_no').....&lt;/STRONG&gt;&amp;nbsp;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(see this part - rest is in NPrinting .qvs I have pointetd you to above in my previous post)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;            SUB NP_ConnectionReload(vNPrintingConnectionName,vNP_ReloadDuration)

                //  Get Connections
                Call NP_GetConnections('$(vNPrintingConnectionName)')

                    FOR Each  vRowNo in FieldValueList('connection_row_no');  

                        //	Extracts the desired Connection ID
                
                        Let vConnectionId               = Peek('connection_id',$(vRowNo)-1,'connection_items');
                        Let vNPrintingConnectionName    = Peek('connection_name',$(vRowNo)-1,'connection_items');
                        //	Trace            
                        Trace 	---;
                        Trace 	Derived ConnectionId for Connection $(vNPrintingConnectionName) is $(vConnectionId);

                        //  Compose the URL for the POST call that triggers a reload metadata

                        Let vReloadMetadataURL      = 'https://$(vNPrintingServer):4993/api/v1/connections/$(vConnectionId)/reload';
                        Trace Reload Metadata URL: ;
                        Trace "$(vReloadMetadataURL)";

                        //  Compose the URL for the GET call that checks the connection status

                        Let vConnectionStatusURL    = 'https://$(vNPrintingServer):4993/api/v1/connections/$(vConnectionId)';
                        Trace Connection Status URL: ;
                        Trace "$(vConnectionStatusURL)" ;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 04:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Qlik-NPrinting-APIs-inside-a-QlikView-load-script-does-not-bring/m-p/1639277#M26601</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2019-10-24T04:37:05Z</dc:date>
    </item>
  </channel>
</rss>

