<?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 Qlik Sense Extension getList('SelectionObject') in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Extension-getList-SelectionObject/m-p/1798605#M14729</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I would like to get help solving a problem with this code: I'm developing a Qlik sense Extension using JavaScript. I Write the function&amp;nbsp;&lt;/SPAN&gt;GetCurrSelect&lt;SPAN&gt;&amp;nbsp;, And I want it to run only when I call it from the paint function. But every time the program needs to run the paint function, it first run the&amp;nbsp;&lt;/SPAN&gt;GetCurrSelect&lt;SPAN&gt;&amp;nbsp;function and even several times. I tried to add the condition&amp;nbsp;&lt;/SPAN&gt;if(a===1)&lt;SPAN&gt;&amp;nbsp;But it did not help, the program accesses this function even without invoke it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;define(["jquery", "qlik", "text!./Network_Diagram.css","./d3.min"], function($ , qlik, cssContent) {'use strict';
    $("&amp;lt;style&amp;gt;").html(cssContent).appendTo("head");
    qlikG=qlik.currApp();
 function GetCurrSelect(a){
    if(a===1)
    {   
      try{
  
         qlikG.getList('SelectionObject',  function(reply){
         alert("here!");
           
            });
          }
          
          catch(err){
          currSelectionNum=0;
          }
          
          }
    }
     return {
       //....
        
        
        paint : function($element,layout) {
         GetCurrSelect(1);
         }
     //....&lt;/PRE&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="mt24 mb12"&gt;&lt;DIV class="post-taglist grid gs4 gsy fd-column"&gt;&lt;DIV class="grid ps-relative"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 11 Apr 2021 22:41:37 GMT</pubDate>
    <dc:creator>noa_elharrar</dc:creator>
    <dc:date>2021-04-11T22:41:37Z</dc:date>
    <item>
      <title>Qlik Sense Extension getList('SelectionObject')</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Extension-getList-SelectionObject/m-p/1798605#M14729</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like to get help solving a problem with this code: I'm developing a Qlik sense Extension using JavaScript. I Write the function&amp;nbsp;&lt;/SPAN&gt;GetCurrSelect&lt;SPAN&gt;&amp;nbsp;, And I want it to run only when I call it from the paint function. But every time the program needs to run the paint function, it first run the&amp;nbsp;&lt;/SPAN&gt;GetCurrSelect&lt;SPAN&gt;&amp;nbsp;function and even several times. I tried to add the condition&amp;nbsp;&lt;/SPAN&gt;if(a===1)&lt;SPAN&gt;&amp;nbsp;But it did not help, the program accesses this function even without invoke it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;define(["jquery", "qlik", "text!./Network_Diagram.css","./d3.min"], function($ , qlik, cssContent) {'use strict';
    $("&amp;lt;style&amp;gt;").html(cssContent).appendTo("head");
    qlikG=qlik.currApp();
 function GetCurrSelect(a){
    if(a===1)
    {   
      try{
  
         qlikG.getList('SelectionObject',  function(reply){
         alert("here!");
           
            });
          }
          
          catch(err){
          currSelectionNum=0;
          }
          
          }
    }
     return {
       //....
        
        
        paint : function($element,layout) {
         GetCurrSelect(1);
         }
     //....&lt;/PRE&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class="mt24 mb12"&gt;&lt;DIV class="post-taglist grid gs4 gsy fd-column"&gt;&lt;DIV class="grid ps-relative"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 11 Apr 2021 22:41:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Extension-getList-SelectionObject/m-p/1798605#M14729</guid>
      <dc:creator>noa_elharrar</dc:creator>
      <dc:date>2021-04-11T22:41:37Z</dc:date>
    </item>
  </channel>
</rss>

