<?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 Populate data in Straight Table cell using Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Populate-data-in-Straight-Table-cell-using-Macro/m-p/335594#M571908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table and I need to populate one column [Stat as EX] on pressing a button using a macro. Below is the straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="19370" class="jive-image-thumbnail jive-image" onclick="" alt="Image1.bmp" src="https://community.qlik.com/legacyfs/online/19370_Image1.bmp" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the the following macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub CalculateSummary1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'On error resume next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set budget = ActiveDocument.GetSheetObject( "CH2033" )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for RowIter = 1 to budget.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'rif = budget.GetCell(RowIter,3).Number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox budget.GetCell(RowIter,7).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; budget.SetInputFieldCell RowIter,7,"test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I am executing the code, the executing is getting stuck in the following line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="19371" class="jive-image" alt="Image2.bmp" src="https://community.qlik.com/legacyfs/online/19371_Image2.bmp" /&gt;&lt;/P&gt;&lt;P&gt;Can you please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sudip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 21:05:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-02T21:05:24Z</dc:date>
    <item>
      <title>Populate data in Straight Table cell using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-data-in-Straight-Table-cell-using-Macro/m-p/335594#M571908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a straight table and I need to populate one column [Stat as EX] on pressing a button using a macro. Below is the straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="19370" class="jive-image-thumbnail jive-image" onclick="" alt="Image1.bmp" src="https://community.qlik.com/legacyfs/online/19370_Image1.bmp" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the the following macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub CalculateSummary1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'On error resume next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set budget = ActiveDocument.GetSheetObject( "CH2033" )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for RowIter = 1 to budget.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'rif = budget.GetCell(RowIter,3).Number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox budget.GetCell(RowIter,7).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; budget.SetInputFieldCell RowIter,7,"test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I am executing the code, the executing is getting stuck in the following line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="19371" class="jive-image" alt="Image2.bmp" src="https://community.qlik.com/legacyfs/online/19371_Image2.bmp" /&gt;&lt;/P&gt;&lt;P&gt;Can you please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sudip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 21:05:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-data-in-Straight-Table-cell-using-Macro/m-p/335594#M571908</guid>
      <dc:creator />
      <dc:date>2012-08-02T21:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Populate data in Straight Table cell using Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-data-in-Straight-Table-cell-using-Macro/m-p/335595#M571909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudip,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two problems here, I think:&lt;/P&gt;&lt;P&gt;1. You're trying to enter text, while input fields are numeric.&lt;/P&gt;&lt;P&gt;2. The error message tells me that you don't use a valid expression for input fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make it work, make sure that column contains expression like inputsum(your field here).&amp;nbsp; Test it with a number rather than string in the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 23:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-data-in-Straight-Table-cell-using-Macro/m-p/335595#M571909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-02T23:37:43Z</dc:date>
    </item>
  </channel>
</rss>

