<?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: QlikView Extension - loop selections in document listbox in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikView-Extension-loop-selections-in-document-listbox/m-p/2027870#M17963</link>
    <description>&lt;P&gt;A bit more context if it helps, prompts some thought:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open any QV app&lt;/LI&gt;
&lt;LI&gt;Open browser console e.g. Ctrl+Shift+I in MS Edge&lt;/LI&gt;
&lt;LI&gt;In the console window type: d = Qv.GetCurrentDocument();&lt;/LI&gt;
&lt;LI&gt;Press enter then type:&amp;nbsp;lb = d.GetObject("LB01");&lt;BR /&gt;this can be any listbox ID, so this is just an example of what I'm trying to automate&lt;/LI&gt;
&lt;LI&gt;Press enter then type:&amp;nbsp;lb.Data.SelectTexts("TEST1");&lt;BR /&gt;or whatever value in the list box&lt;/LI&gt;
&lt;LI&gt;Press enter then type:&amp;nbsp;lb.Data.SelectTexts("TEST2");&lt;/LI&gt;
&lt;LI&gt;Each time you can see the app updating one at a time, no problem&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Basically this works fine in the console window and I can type as many values in steps 5/6 as needed and the app is refreshed and waits in between. However, these steps aren't being triggered in the middle of a loop from the js extension and I'd love to be able to resolve. I need to effectively loop the listbox and print the extension object with another function inside the extension.&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Ian&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 15:22:26 GMT</pubDate>
    <dc:creator>qliknerd</dc:creator>
    <dc:date>2023-01-19T15:22:26Z</dc:date>
    <item>
      <title>QlikView Extension - loop selections in document listbox</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikView-Extension-loop-selections-in-document-listbox/m-p/2024442#M17910</link>
      <description>&lt;P&gt;Does anyone have an example of how to loop selecting within a list box from an extension?&lt;/P&gt;
&lt;P&gt;I have a comma separated list I am passing via a variable to the extension.&lt;/P&gt;
&lt;P&gt;The values are then split and I call the selection using a button in the extension.&lt;/P&gt;
&lt;P&gt;This makes a selection in the listbox, but it does not loop as I'd expect (think of using the get selected values and looping on that if you were using a macro).&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;SPAN&gt;function&lt;/SPAN&gt; &lt;SPAN&gt;selection&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;ID&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;doc&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Qv&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetCurrentDocument&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;obj1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;doc&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;GetObject&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"LB01"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&g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lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;ObjectMgr&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; };&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see the IDs have been called in the listbox:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qliknerd_0-1673451336228.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/97804i07EE567DA868AF0E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qliknerd_0-1673451336228.png" alt="qliknerd_0-1673451336228.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, the extension only ever fully renders the first value.&lt;/P&gt;
&lt;P&gt;Looked in here, but not finding what I want:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/qlikview-developer/May2021/APIs/js+API/index.html" target="_blank"&gt;JsDoc Reference - Getting Started (qlik.com)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Have also tried using different functions, and console.logs show the same thing - loop works, but selections don't re-render the extension for some reason.&lt;/P&gt;
&lt;P&gt;Any help or pointers would be appreciated&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Ian&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 15:37:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikView-Extension-loop-selections-in-document-listbox/m-p/2024442#M17910</guid>
      <dc:creator>qliknerd</dc:creator>
      <dc:date>2023-01-11T15:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView Extension - loop selections in document listbox</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikView-Extension-loop-selections-in-document-listbox/m-p/2027870#M17963</link>
      <description>&lt;P&gt;A bit more context if it helps, prompts some thought:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open any QV app&lt;/LI&gt;
&lt;LI&gt;Open browser console e.g. Ctrl+Shift+I in MS Edge&lt;/LI&gt;
&lt;LI&gt;In the console window type: d = Qv.GetCurrentDocument();&lt;/LI&gt;
&lt;LI&gt;Press enter then type:&amp;nbsp;lb = d.GetObject("LB01");&lt;BR /&gt;this can be any listbox ID, so this is just an example of what I'm trying to automate&lt;/LI&gt;
&lt;LI&gt;Press enter then type:&amp;nbsp;lb.Data.SelectTexts("TEST1");&lt;BR /&gt;or whatever value in the list box&lt;/LI&gt;
&lt;LI&gt;Press enter then type:&amp;nbsp;lb.Data.SelectTexts("TEST2");&lt;/LI&gt;
&lt;LI&gt;Each time you can see the app updating one at a time, no problem&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Basically this works fine in the console window and I can type as many values in steps 5/6 as needed and the app is refreshed and waits in between. However, these steps aren't being triggered in the middle of a loop from the js extension and I'd love to be able to resolve. I need to effectively loop the listbox and print the extension object with another function inside the extension.&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Ian&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikView-Extension-loop-selections-in-document-listbox/m-p/2027870#M17963</guid>
      <dc:creator>qliknerd</dc:creator>
      <dc:date>2023-01-19T15:22:26Z</dc:date>
    </item>
  </channel>
</rss>

