<?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: Loop using Rest API in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1512918#M436728</link>
    <description>&lt;P&gt;It seems you are autoconcatenating your&amp;nbsp;RestConnectorMasterTable with each DO WHILE loop. This should mean the line "Let vURL = FieldValue('@odata.nextLink',1)" will always return the first URL loaded since FieldValue returns the value by load order (see Help for this function).&lt;/P&gt;&lt;P&gt;Try adding "Trace $(&lt;SPAN&gt;vURL&lt;/SPAN&gt;)" after you update the variable to see if the variable vURL is set to what you would expect.&lt;/P&gt;&lt;P&gt;If you are constantly using the first loaded URL try using the Peek() function to return the last URL read.&lt;/P&gt;&lt;P&gt;Also beware of spaces within the vURL string. I would also adjust the exit condition to LEN(TRIM('$(vURL)'))&amp;gt;0 just to be sure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2018 13:45:08 GMT</pubDate>
    <dc:creator>kjhertz</dc:creator>
    <dc:date>2018-11-27T13:45:08Z</dc:date>
    <item>
      <title>Loop using Rest API</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1512848#M436716</link>
      <description>&lt;P&gt;Good Morning All,&lt;/P&gt;&lt;P&gt;I have an issue while looping through my Accounts table.&amp;nbsp; It only has 30K rows of data, but does not know when to stop looping.&amp;nbsp; I thought checking for the length of the variable being returned would work, but it appears it doesn't.&amp;nbsp; Any ideas?&lt;/P&gt;&lt;P&gt;Thanks......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" size="1"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt; vURL = '&lt;A href="https://CRMqas.api.crm.dynamics.com/api/data/v9.0/accounts" target="_blank"&gt;https://CRMqas.api.crm.dynamics.com/api/data/v9.0/accounts&lt;/A&gt;';&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LET&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; i = 1;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;CUSTOM&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;CONNECT&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;TO&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;"Provider=QvRestConnector.exe;url=$(vURL);timeout=30;method=GET;sendExpect100Continue=True;autoDetectResponseType=true;checkResponseTypeOnTestConnection=true;keyGenerationStrategy=0;authSchema=anonymous;skipServerCertificateValidation=false;useCertificate=No;certificateStoreLocation=CurrentUser;certificateStorbeeName=My;queryHeaders=OData-MaxVersion%24.0%1OData-Version%24.0%1Authorization%2Bearer $(vToken);PaginationType=None;allowResponseHeaders=false;allowHttpsOnly=false;XUserId=ZCASARB;XPassword=GbTdcBA;"&lt;/FONT&gt;&lt;FONT size="1"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;DO&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;while&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;LEN&lt;/FONT&gt;&lt;FONT size="1"&gt;('$(vURL)') &amp;gt; 0&amp;nbsp;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;RestConnectorMasterTable:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; SELECT&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"@odata.context"&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"@odata.nextLink"&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"__KEY_root"&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;(SELECT&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"@odata.etag"&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"accountid"&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"__FK_value"&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;FROM &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"value"&lt;/FONT&gt;&lt;FONT size="1"&gt; FK &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"__FK_value"&lt;/FONT&gt;&lt;FONT size="1"&gt;)&lt;BR /&gt;FROM JSON (wrap on) &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"root"&lt;/FONT&gt;&lt;FONT size="1"&gt; PK &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"__KEY_root"&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;WITH CONNECTION (Url &lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;"$(vURL)"&lt;/FONT&gt;&lt;FONT size="1"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[Accounts]&lt;/FONT&gt;&lt;FONT size="1"&gt;:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800000" size="1"&gt;[@odata.etag]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[accountid]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[__FK_value]&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;AS&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[__KEY_root]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; RestConnectorMasterTable&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;WHERE&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;NOT&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;IsNull&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[__FK_value]&lt;/FONT&gt;&lt;FONT size="1"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;STORE&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; * &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FROM&lt;/FONT&gt; &lt;FONT color="#800000" size="1"&gt;[RestConnectorMasterTable]&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;into&lt;/FONT&gt;&lt;FONT size="1"&gt; qvd\Accounts365.QVD&lt;BR /&gt;;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[root]&lt;/FONT&gt;&lt;FONT size="1"&gt;:&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LOAD&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800000" size="1"&gt;[@odata.context]&lt;/FONT&gt;&lt;FONT size="1"&gt;,&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[__KEY_root]&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;RESIDENT&lt;/FONT&gt;&lt;FONT size="1"&gt; RestConnectorMasterTable&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;WHERE&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;NOT&lt;/FONT&gt; &lt;FONT color="#0000ff" size="1"&gt;IsNull&lt;/FONT&gt;&lt;FONT size="1"&gt;(&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;[__KEY_root]&lt;/FONT&gt;&lt;FONT size="1"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;Let&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; vURL = &lt;/FONT&gt;&lt;FONT color="#0000ff" size="1"&gt;FieldValue&lt;/FONT&gt;&lt;FONT size="1"&gt;('@odata.nextLink',1);&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;LET&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt; i=&lt;/FONT&gt;&lt;FONT color="#800000" size="1"&gt;i&lt;/FONT&gt;&lt;FONT size="1"&gt;+1;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;Loop&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="1"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#0000ff" size="1"&gt;DROP&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="1"&gt;TABLE&lt;/FONT&gt;&lt;FONT size="1"&gt; RestConnectorMasterTable; &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1512848#M436716</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2024-11-16T05:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loop using Rest API</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1512918#M436728</link>
      <description>&lt;P&gt;It seems you are autoconcatenating your&amp;nbsp;RestConnectorMasterTable with each DO WHILE loop. This should mean the line "Let vURL = FieldValue('@odata.nextLink',1)" will always return the first URL loaded since FieldValue returns the value by load order (see Help for this function).&lt;/P&gt;&lt;P&gt;Try adding "Trace $(&lt;SPAN&gt;vURL&lt;/SPAN&gt;)" after you update the variable to see if the variable vURL is set to what you would expect.&lt;/P&gt;&lt;P&gt;If you are constantly using the first loaded URL try using the Peek() function to return the last URL read.&lt;/P&gt;&lt;P&gt;Also beware of spaces within the vURL string. I would also adjust the exit condition to LEN(TRIM('$(vURL)'))&amp;gt;0 just to be sure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 13:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1512918#M436728</guid>
      <dc:creator>kjhertz</dc:creator>
      <dc:date>2018-11-27T13:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loop using Rest API</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1513050#M436742</link>
      <description>&lt;P&gt;I'm a rookie when it comes to using the REST API.&amp;nbsp; How can I get the next url in vurl?&amp;nbsp; CRM365 only allows 5000 rows per call.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 16:23:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1513050#M436742</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2018-11-27T16:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Loop using Rest API</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1513150#M436749</link>
      <description>&lt;P&gt;nextURL is not getting populated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 20:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/1513150#M436749</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2018-11-27T20:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loop using Rest API</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/2462780#M1225813</link>
      <description>&lt;P&gt;As an addition to this topic, I'm excited to share my latest tutorial on integrating Asana with Qlik Cloud using REST APIs!&lt;/P&gt;
&lt;P&gt;In this step-by-step guide, you'll learn:&lt;BR /&gt;- How to use Asana REST APIs with Postman&lt;BR /&gt;- Creating REST Data Connections in Qlik Cloud&lt;BR /&gt;- Extracting data from Asana and saving as Parquet files&lt;BR /&gt;- Enhancing connections with custom parameters and pagination&lt;/P&gt;
&lt;P&gt;Check out the full video on YouTube:&lt;BR /&gt;&lt;STRONG&gt;Integrate Asana with Qlik Cloud Using REST APIs: A Step-by-Step Guide&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://youtu.be/lFwar30BNkQ?si=UZoM_x9L5amdJSnf" target="_blank"&gt;https://youtu.be/lFwar30BNkQ?si=UZoM_x9L5amdJSnf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Mark Costa&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 22:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-using-Rest-API/m-p/2462780#M1225813</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2024-06-15T22:08:54Z</dc:date>
    </item>
  </channel>
</rss>

