<?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: Incomplete List of Connections Returned in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754790#M30349</link>
    <description>&lt;P&gt;by the way - query limit is the number of records you want to return from query. If you dont have this parameter only limited (I think 50) records are returned&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2020 06:51:16 GMT</pubDate>
    <dc:creator>Lech_Miszkiewicz</dc:creator>
    <dc:date>2020-10-22T06:51:16Z</dc:date>
    <item>
      <title>Incomplete List of Connections Returned</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754633#M30340</link>
      <description>&lt;P&gt;I have a Qlik load script where I am trying to execute a task in NPrinting.&amp;nbsp; This script originated from Qlik and was working for awhile and then it stopped working.&amp;nbsp; I went through the script in debug mode and narrowed it down to the step where a list of NPrinting connections was requested.&amp;nbsp; I added an exit script right after the "RestConnectionMasterTable" was created to see what was in that table.&amp;nbsp; As expected, I see the names of the NPrinting connections but its not a complete list.&amp;nbsp; I did not find the connection that I was looking for.&amp;nbsp; I went on the NPrinting server and checked that the connection existed.&amp;nbsp; As a result, if I remove the exit script and let the reload continue, the connection id would be queried and used to build additional URLs.&amp;nbsp; Since my connection did not exist in the table,&amp;nbsp; any further REST calls will fail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//GET the list of the connections contained in the NP App selected before&lt;BR /&gt;RestConnectionMasterTable:&lt;BR /&gt;SQL SELECT&lt;BR /&gt;"__KEY_data",&lt;BR /&gt;(SELECT&lt;BR /&gt;"id",&lt;BR /&gt;"name",&lt;BR /&gt;"appId",&lt;BR /&gt;"__FK_items"&lt;BR /&gt;FROM "items" FK "__FK_items")&lt;BR /&gt;FROM JSON (wrap off) "data" PK "__KEY_data"&lt;BR /&gt;WITH CONNECTION( URL "$(v_NPRINTING_URL)/api/v1/connections", HTTPHEADER "cookie" "$(vCookie)" );&lt;/P&gt;&lt;P&gt;[connection_items]:&lt;BR /&gt;LOAD [id] AS [connection_id],&lt;BR /&gt;[name] AS [connection_name],&lt;BR /&gt;[appId] AS [connection_appId]&lt;BR /&gt;RESIDENT RestConnectionMasterTable&lt;BR /&gt;WHERE NOT IsNull([__FK_items]) AND [appId] = '$(vAppId)' and upper([name]) = upper('$(v_CONN_NAME)');&lt;/P&gt;&lt;P&gt;//Extracts the desired Connection ID&lt;BR /&gt;let vConnectionId = Peek('connection_id',0,'connection_items');&lt;/P&gt;&lt;P&gt;IF NoOfRows('connection_items') = 0 then&lt;/P&gt;&lt;P&gt;TRACE ERROR &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Connection ID Not Found;&lt;BR /&gt;//CALL ThrowError('Error: Connection ID Not Found')&lt;BR /&gt;Set TriggerError;&lt;BR /&gt;exit script;&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;//Compose the URL for the POST call that triggers a reload metadata&lt;BR /&gt;let vReloadMetadataURL = '$(v_NPRINTING_URL)/api/v1/connections/'&amp;amp;'$(vConnectionId)'&amp;amp;'/reload';&lt;/P&gt;&lt;P&gt;//Compose the URL for the GET call that checks the connection status&lt;BR /&gt;let vConnectionStatusURL = '$(v_NPRINTING_URL)/api/v1/connections/'&amp;amp;'$(vConnectionId)';&lt;/P&gt;&lt;P&gt;DROP TABLE RestConnectionMasterTable;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 17:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754633#M30340</guid>
      <dc:creator>wlau</dc:creator>
      <dc:date>2020-10-21T17:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete List of Connections Returned</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754731#M30346</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are not using QueryLimit parameters in your REST queries which is likely the reason why you are not getting all connections.&lt;/P&gt;&lt;P&gt;Have a look at my NPrinting.qvs library :&amp;nbsp;&lt;A href="https://nprintingadventures.com/2019/04/08/nprinting-api-qlik-rest-subroutines/" target="_blank"&gt;https://nprintingadventures.com/2019/04/08/nprinting-api-qlik-rest-subroutines/&lt;/A&gt;&amp;nbsp;where you will find examples of how it needs to be used to get full result set&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42768iE51F10451DCD4ACF/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 22:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754731#M30346</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2020-10-21T22:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete List of Connections Returned</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754790#M30349</link>
      <description>&lt;P&gt;by the way - query limit is the number of records you want to return from query. If you dont have this parameter only limited (I think 50) records are returned&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 06:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1754790#M30349</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2020-10-22T06:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Incomplete List of Connections Returned</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1755091#M30357</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; That did the trick.&amp;nbsp; We also added that parameter to other parts of the script such as the request to get lists for applications and tasks from NPrinting.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 16:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/Incomplete-List-of-Connections-Returned/m-p/1755091#M30357</guid>
      <dc:creator>wlau</dc:creator>
      <dc:date>2020-10-22T16:37:27Z</dc:date>
    </item>
  </channel>
</rss>

