<?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: Macro reading columns incorrectly using ajax client in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-reading-columns-incorrectly-using-ajax-client/m-p/1141262#M888557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Had you checked the values of your table (maybe with some selections to don't run through thousands of cells):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for RowIter = 0 to sObject4.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter = 0 to sObject4.GetColumnCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(sObject4.GetCell(RowIter,ColIter).Text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;next &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe they are different to your expectation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 Sep 2016 09:10:57 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-09-04T09:10:57Z</dc:date>
    <item>
      <title>Macro reading columns incorrectly using ajax client</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-reading-columns-incorrectly-using-ajax-client/m-p/1141261#M888556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the code below to locate the correct column number (by name) to use in GetCell function. &lt;/P&gt;&lt;P&gt; ' get column numbers of interest&lt;/P&gt;&lt;P&gt;&amp;nbsp; for RowIter = 0 to sObject4.GetRowCount-1&amp;nbsp;&amp;nbsp; ' traverse rows in table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if RowIter = 0 then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter = 0 to sObject4.GetColumnCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set colName = sObject4.GetCell(RowIter,ColIter)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; if colName.Text = "Invoice Value" then l_col_value = ColIter end if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp; next &lt;/P&gt;&lt;P&gt;&amp;nbsp; MsgBox l_col_value&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;set l_value = &lt;SPAN style="font-size: 13.3333px;"&gt;sObject4&lt;/SPAN&gt;.GetCell(RowIter,&lt;SPAN style="font-size: 13.3333px;"&gt;l_col_value &lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I have been struggling to find a reason why&amp;nbsp; I get a different result in the designer and with the web browser&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This post explained that the a natural sort order of columns in straight tables is necessary to get the same result. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlikview.com/thread/62636" style="font-size: 13.3333px; line-height: 1.5em;" title="https://community.qlikview.com/thread/62636" target="_blank"&gt;https://community.qlikview.com/thread/62636&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Do not drag and drop columns if you want to use macros like this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-reading-columns-incorrectly-using-ajax-client/m-p/1141261#M888556</guid>
      <dc:creator>sangland2</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro reading columns incorrectly using ajax client</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-reading-columns-incorrectly-using-ajax-client/m-p/1141262#M888557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Had you checked the values of your table (maybe with some selections to don't run through thousands of cells):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for RowIter = 0 to sObject4.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter = 0 to sObject4.GetColumnCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(sObject4.GetCell(RowIter,ColIter).Text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;next &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe they are different to your expectation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Sep 2016 09:10:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-reading-columns-incorrectly-using-ajax-client/m-p/1141262#M888557</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-09-04T09:10:57Z</dc:date>
    </item>
  </channel>
</rss>

