<?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: How to access indexed variables in a table when loaded using For Loop in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1917082#M16596</link>
    <description>&lt;P&gt;You are correct my friend, thank you for everything. Its working great now&lt;/P&gt;</description>
    <pubDate>Mon, 11 Apr 2022 19:52:09 GMT</pubDate>
    <dc:creator>coleturegroup</dc:creator>
    <dc:date>2022-04-11T19:52:09Z</dc:date>
    <item>
      <title>How to access indexed variables in a table when loaded using For Loop</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1916430#M16585</link>
      <description>&lt;P&gt;&lt;BR /&gt;I loaded test data with three rows for each Area and looped through the table using the peek function. I want to be able to access in a controlled manner to fill up sections of code based on Unit Area.&lt;/P&gt;
&lt;P&gt;The following data file sample:&lt;/P&gt;
&lt;P&gt;BusinessArea,BQLink,BQTitle,BQuestion&lt;BR /&gt;AreaNorth,&lt;A href="https://www.msn.com" target="_blank"&gt;https://www.msn.com&lt;/A&gt;, Requests for information North, Show me Question for North&lt;BR /&gt;AreaSouth,&lt;A href="https://www.oracle.com" target="_blank"&gt;https://www.oracle.com&lt;/A&gt;, Requests for information South, Show me Question for South&lt;BR /&gt;AreaWest,&lt;A href="https://www.yahoo.com" target="_blank"&gt;https://www.yahoo.com&lt;/A&gt;, Requests for information West, Show me Question for West&lt;BR /&gt;AreaEast,&lt;A href="https://www.Sybase.com" target="_blank"&gt;https://www.Sybase.com&lt;/A&gt;, Requests for information East, Show me Question for East&lt;/P&gt;
&lt;P&gt;AreaNorth,&lt;A href="https://www.msn.com" target="_blank"&gt;https://www.msn.com&lt;/A&gt;, Requests 2 for information North, Show me Question 2 for North&lt;BR /&gt;AreaSouth,&lt;A href="https://www.oracle.com" target="_blank"&gt;https://www.oracle.com&lt;/A&gt;, Requests 2 for information South, Show me Question 2 for South&lt;BR /&gt;AreaWest,&lt;A href="https://www.yahoo.com" target="_blank"&gt;https://www.yahoo.com&lt;/A&gt;, Requests 2 for information West, Show me Question 2 for West&lt;BR /&gt;AreaEast,&lt;A href="https://www.Sybase.com" target="_blank"&gt;https://www.Sybase.com&lt;/A&gt;, Requests 2 for information East, Show me Question 2 for East&lt;/P&gt;
&lt;P&gt;AreaNorth,&lt;A href="https://www.msn.com" target="_blank"&gt;https://www.msn.com&lt;/A&gt;, Requests 3 for information North, Show me Question 3 for North&lt;BR /&gt;AreaSouth,&lt;A href="https://www.oracle.com" target="_blank"&gt;https://www.oracle.com&lt;/A&gt;, Requests 3 for information South, Show me Question 3 for South&lt;BR /&gt;AreaWest,&lt;A href="https://www.yahoo.com" target="_blank"&gt;https://www.yahoo.com&lt;/A&gt;, Requests 3 for information West, Show me Question 3 for West&lt;BR /&gt;AreaEast,&lt;A href="https://www.Sybase.com" target="_blank"&gt;https://www.Sybase.com&lt;/A&gt;, Requests 3 for information East, Show me Question 3 for East&lt;/P&gt;
&lt;P&gt;My load script:&lt;/P&gt;
&lt;P&gt;[Area Questions]:&lt;BR /&gt;LOAD&lt;BR /&gt;BusinessArea,&lt;BR /&gt;BQLink,&lt;BR /&gt;BQTitle,&lt;BR /&gt;BQuestion&lt;BR /&gt;FROM [lib://AttachedFiles/Area Questions.txt]&lt;BR /&gt;(txt, codepage is 28591, embedded labels, delimiter is ',', msq);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;LET NumRows=NoOfRows([Area Questions]);&lt;BR /&gt;FOR i=0 to $(NumRows)-1&lt;BR /&gt;&amp;nbsp; &amp;nbsp;LET vBQBU=Peek('BusinessArea',$(i),[Area Questions]);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;LET vBQL=Peek('BQLink',$(i),[Area Questions]);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;LET vBQT=Peek('BQTitle',$(i),[Area Questions]);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;LET vBQ=peek('BQuestion',$(i),[Area Questions]);&lt;BR /&gt;NEXT;&lt;/P&gt;
&lt;P&gt;Then load the variables into an HTML Measure to propagate a dropdown menu of questions using the extension ShowHTMLasMeasure:&lt;/P&gt;
&lt;P&gt;Its not cooperating and I'm sure I'm doing it incorrectly. Can anyone assist in my logic?&lt;/P&gt;
&lt;P&gt;&amp;amp;'&amp;lt;li class="dropdown"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="javascript&amp;amp;colon;void(0)" class="dropbtn"&amp;gt; $(vBQBU)(1) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;div class="dropdown-content"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(1).$(vBQL)(1)" title=" $(vBQBU)(1).$(BQT) (1) "&amp;gt; $(vBQBU)(1).$(vBQ) (1) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(1).$(vBQL)(2)" title=" $(vBQBU)(1).$(BQT) (2) "&amp;gt; $(vBQBU)(1).$(vBQ) (2) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(1).$(vBQL)(3)" title=" $(vBQBU)(1).$(BQT) (3) "&amp;gt; $(vBQBU)(1).$(vBQ) (3) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/div&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/li&amp;gt; '&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;amp;'&amp;lt;li class="dropdown"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="javascript&amp;amp;colon;void(0)" class="dropbtn"&amp;gt; $(vBQBU)(2) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;div class="dropdown-content"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(2).$(vBQL)(1)" title=" $(vBQBU)(2).$(BQT) (1) "&amp;gt; $(vBQBU)(2).$(vBQ) (1) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(2).$(vBQL)(2)" title=" $(vBQBU)(2).$(BQT) (2) "&amp;gt; $(vBQBU)(2).$(vBQ) (2) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(2).$(vBQL)(3)" title=" $(vBQBU)(2).$(BQT) (3) "&amp;gt; $(vBQBU)(2).$(vBQ) (3) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/div&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/li&amp;gt; '&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;amp;'&amp;lt;li class="dropdown"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="javascript&amp;amp;colon;void(0)" class="dropbtn"&amp;gt; $(vBQBU)(3) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;div class="dropdown-content"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(3).$(vBQL)(1)" title=" $(vBQBU)(3).$(BQT) (1) "&amp;gt; $(vBQBU)(3).$(vBQ) (1) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(3).$(vBQL)(2)" title=" $(vBQBU)(3).$(BQT) (2) "&amp;gt; $(vBQBU)(3).$(vBQ) (2) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQBU)(3).$(vBQL)(3)" title=" $(vBQBU)(3).$(BQT) (3) "&amp;gt; $(vBQBU)(3).$(vBQ) (3) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/div&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/li&amp;gt; '&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 17:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1916430#M16585</guid>
      <dc:creator>coleturegroup</dc:creator>
      <dc:date>2022-04-08T17:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to access indexed variables in a table when loaded using For Loop</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1916535#M16587</link>
      <description>&lt;P&gt;Hi, the variable values are ovewritten in eah iteration of the FOR_NEXT bucle, so only the last values will keep.&lt;/P&gt;
&lt;P&gt;You can create a variable at start like LET vHTML=''; and add to this variable on each iteration of the bucle, yo will need another bucle inside to iterate BQL, BQT and BQ.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LET NumRows=NoOfRows([Area Questions]);
LET vHTML=''
FOR i=0 to $(NumRows)-1
   LET vBQBU=Peek('BusinessArea',$(i),[Area Questions]);

LET vHTML = '$(vHTML)'
  &amp;amp;'&amp;lt;li class="dropdown"&amp;gt; '
  &amp;amp;' &amp;lt;a href="javascript&amp;amp;colon;void(0)" class="dropbtn"&amp;gt; $(vBQBU) &amp;lt;/a&amp;gt; '
  &amp;amp;' &amp;lt;div class="dropdown-content"&amp;gt; '

  FOR j=1 to 3
    LET vBQL=Peek('BQLink',$(j),[Area Questions]);
    LET vBQT=Peek('BQTitle',$(j),[Area Questions]);
    LET vBQ=peek('BQuestion',$(j),[Area Questions]);
    LET vHTML = '$(vHTML)'
    &amp;amp;' &amp;lt;a href="$(vBQBU).$(vBQL)" title=" $(vBQBU).$(BQT)"&amp;gt; $(vBQBU).$(vBQ)&amp;lt;/a&amp;gt; '
    &amp;amp;' &amp;lt;a href="$(vBQBU).$(vBQL)" title=" $(vBQBU).$(BQT)"&amp;gt; $(vBQBU).$(vBQ)&amp;lt;/a&amp;gt; '
    &amp;amp;' &amp;lt;a href="$(vBQBU).$(vBQL)" title=" $(vBQBU).$(BQT)"&amp;gt; $(vBQBU).$(vBQ)&amp;lt;/a&amp;gt; '
  NEXT;
NEXT;
LET vHTML = '$(vHTML)'
  &amp;amp;' &amp;lt;/div&amp;gt; '
  &amp;amp;' &amp;lt;/li&amp;gt; '&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 07:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1916535#M16587</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-04-09T07:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to access indexed variables in a table when loaded using For Loop</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1916991#M16592</link>
      <description>&lt;P&gt;Great to hear from you and thank you for your response, i copied the above code to my ShowHTMLasMeasure&amp;nbsp; extension in the measure and it gets errors. Is that where you thought it would go?&lt;/P&gt;
&lt;P&gt;LET NumRows=NoOfRows([Area Questions]); &lt;BR /&gt;LET vHTML=''; &lt;BR /&gt;FOR i=0 to $(NumRows)-1 &lt;BR /&gt;LET vBQBU=Peek('BusinessArea',$(i),[Area Questions]); &lt;BR /&gt;LET vBQL=Peek(BQLink,$(j),[Area Questions]); &lt;BR /&gt;LET vBQT=Peek(BQTitle,$(j),[Area Questions]); &lt;BR /&gt;LET vBQ=peek(BQuestion,$(j),[Area Questions]);&lt;/P&gt;
&lt;P&gt;&amp;amp;'&amp;lt;ul&amp;gt; '&lt;/P&gt;
&lt;P&gt;&amp;amp;' LET vHTML = $(vHTML) '&lt;BR /&gt;&amp;amp;'&amp;lt;li class="dropdown"&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="javascript&amp;amp;colon;void(0)" class="dropbtn"&amp;gt; $(vBQBU) &amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;div class="dropdown-content"&amp;gt; '&lt;/P&gt;
&lt;P&gt;&amp;amp;' FOR j=1 to 3 '&lt;BR /&gt;&amp;amp;' LET vHTML = '$(vHTML)' '&lt;BR /&gt;&amp;amp;' &amp;lt;a href="$(vBQL)" title=" $(BQT)"&amp;gt; $(vBQ)&amp;lt;/a&amp;gt; '&lt;BR /&gt;&amp;amp;' NEXT; '&lt;BR /&gt;&amp;amp;' NEXT; '&lt;BR /&gt;&amp;amp;' LET vHTML = '$(vHTML)' '&lt;BR /&gt;&amp;amp;' &amp;lt;/div&amp;gt; '&lt;BR /&gt;&amp;amp;' &amp;lt;/li&amp;gt; '&lt;BR /&gt;&lt;BR /&gt;&amp;amp;'&amp;lt;/ul&amp;gt; '&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="coleturegroup_0-1649692750225.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76810iA2D18D24FFB04AC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="coleturegroup_0-1649692750225.png" alt="coleturegroup_0-1649692750225.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 16:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1916991#M16592</guid>
      <dc:creator>coleturegroup</dc:creator>
      <dc:date>2022-04-11T16:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to access indexed variables in a table when loaded using For Loop</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1917010#M16595</link>
      <description>&lt;P&gt;Hi, that's not what I posted. Check it carefully, there are many things different.&lt;/P&gt;
&lt;P&gt;Also the error message below seems that it lacks a semicolon after &amp;lt;/tilte&amp;gt;'&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 16:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1917010#M16595</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-04-11T16:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to access indexed variables in a table when loaded using For Loop</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1917082#M16596</link>
      <description>&lt;P&gt;You are correct my friend, thank you for everything. Its working great now&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 19:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-access-indexed-variables-in-a-table-when-loaded-using-For/m-p/1917082#M16596</guid>
      <dc:creator>coleturegroup</dc:creator>
      <dc:date>2022-04-11T19:52:09Z</dc:date>
    </item>
  </channel>
</rss>

