<?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: Issue with Dynamic REST API Call Using &amp;quot;WITH CONNECTION&amp;quot; in Qlik Sense in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506672#M14615</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/253994"&gt;@Eshwar1&lt;/a&gt;&amp;nbsp;have you gone through this post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/td-p/1171514" target="_blank"&gt;https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/td-p/1171514&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2025 19:14:36 GMT</pubDate>
    <dc:creator>David_Friend</dc:creator>
    <dc:date>2025-02-19T19:14:36Z</dc:date>
    <item>
      <title>Issue with Dynamic REST API Call Using "WITH CONNECTION" in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506660#M14613</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I am trying to load data from the following API endpoint using the Qlik REST Connector:&lt;BR /&gt;API URL:&amp;nbsp;&lt;A href="https://disease.sh/v3/covid-19/countries/USA" target="_blank" rel="noopener"&gt;https://disease.sh/v3/covid-19/countries/USA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Implementation Details:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I created a REST API Connection in Qlik Sense named 'CovidAPI'.&lt;/LI&gt;
&lt;LI&gt;I defined a variable vCountry to dynamically pass the country parameter.&lt;/LI&gt;
&lt;LI&gt;In the front-end, I created an input variable (vCountry) where users can select different country values (e.g., 'USA', 'India', 'UK').&lt;/LI&gt;
&lt;LI&gt;I also added a button to reload the app when a new country is selected.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;My Script:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;SET vCountry = 'USA';&amp;nbsp; // Default Country&lt;/P&gt;
&lt;P&gt;LIB CONNECT TO 'CovidAPI';&lt;/P&gt;
&lt;P&gt;CovidData:&lt;/P&gt;
&lt;P&gt;SQL SELECT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "country",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cases",&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "recovered"&lt;/P&gt;
&lt;P&gt;FROM JSON (wrap on) "root"&lt;/P&gt;
&lt;P&gt;WITH CONNECTION (&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; URL "&lt;A href="https://disease.sh/v3/covid-19/countries/$(vCountry" target="_blank" rel="noopener"&gt;https://disease.sh/v3/covid-19/countries/$(vCountry&lt;/A&gt;)"&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When I select a different country (e.g., 'India' or 'UK') from the input variable and click the &lt;STRONG&gt;reload button&lt;/STRONG&gt;, the table chart is &lt;STRONG&gt;not updating&lt;/STRONG&gt; to reflect the selected country’s data. It still shows the previously loaded data.&lt;/P&gt;
&lt;P&gt;Troubleshooting Done:&lt;/P&gt;
&lt;P&gt;Checked if "WITH CONNECTION" is enabled in the REST Connector settings.&lt;BR /&gt;&amp;nbsp;Verified that vCountry is updating correctly in the &lt;STRONG&gt;Variable Editor&lt;/STRONG&gt;.&lt;BR /&gt;&amp;nbsp;Manually running the script with a hardcoded country (e.g., SET vCountry = 'India';) works fine.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is there a better way to dynamically pass the country parameter in the API request?&lt;/LI&gt;
&lt;LI&gt;Does Qlik Sense cache API responses, and how can I force a fresh reload?&lt;/LI&gt;
&lt;LI&gt;Is there a workaround if "WITH CONNECTION" is not working dynamically?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any insights or alternative approaches would be greatly appreciated!&lt;/P&gt;
&lt;P data-start="2088" data-end="2111"&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 17:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506660#M14613</guid>
      <dc:creator>Eshwar1</dc:creator>
      <dc:date>2025-02-19T17:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dynamic REST API Call Using "WITH CONNECTION" in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506672#M14615</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/253994"&gt;@Eshwar1&lt;/a&gt;&amp;nbsp;have you gone through this post:&amp;nbsp;&lt;A href="https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/td-p/1171514" target="_blank"&gt;https://community.qlik.com/t5/App-Development/Chart-is-not-updated-automatically-if-variable-is-used-as/td-p/1171514&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 19:14:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506672#M14615</guid>
      <dc:creator>David_Friend</dc:creator>
      <dc:date>2025-02-19T19:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dynamic REST API Call Using "WITH CONNECTION" in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506675#M14616</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/253994"&gt;@Eshwar1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In summary, you cannot set a variable in your Load Script. This Load Script variable will always have its value reset during the load process - unless you do some fancy logic. Instead of doing that, create a variable in your dashboard:&lt;/P&gt;
&lt;P&gt;1. Create your variable in your User Interface. Click on the Variable button showed in the picture below and then click on &lt;STRONG&gt;Create new&lt;/STRONG&gt; button.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="marksouzacosta_0-1739993646347.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177711i86983EAB1D26DB98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="marksouzacosta_0-1739993646347.png" alt="marksouzacosta_0-1739993646347.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Now, use this new variable to setup the values from the User Interface. Every time you set it on the UI, it will be carried to your Load Script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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>Wed, 19 Feb 2025 19:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506675#M14616</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2025-02-19T19:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dynamic REST API Call Using "WITH CONNECTION" in Qlik Sense</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506823#M14621</link>
      <description>&lt;P&gt;Thank you Mark, its working now as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 16:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Issue-with-Dynamic-REST-API-Call-Using-quot-WITH-CONNECTION-quot/m-p/2506823#M14621</guid>
      <dc:creator>Eshwar1</dc:creator>
      <dc:date>2025-02-20T16:18:15Z</dc:date>
    </item>
  </channel>
</rss>

