<?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 SetInputFieldCell usage in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150583#M28568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I need to write a macro to initialize input fields to some values (ex: set a budget according to real values from previous year). I wrote the following code, but it does not work. Writing the same constant value in the input fields is ok, but when I try to set it to the value coming from another cell it fails. I also tried using two different tables, no way..... The macro works for the first value, then it crashes.&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Paolo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Sub ResetInputFields&lt;BR /&gt;on error resume next&lt;BR /&gt; set budget = ActiveDocument.GetSheetObject( "BUDGET" )&lt;BR /&gt; for RowIter = RowIter to budget.GetRowCount-1&lt;BR /&gt; rif = budget.GetCell(RowIter,2).Number&lt;BR /&gt; budget.SetInputFieldCell RowIter,1,rif&lt;BR /&gt; next&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2009 17:08:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-29T17:08:39Z</dc:date>
    <item>
      <title>SetInputFieldCell usage</title>
      <link>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150583#M28568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I need to write a macro to initialize input fields to some values (ex: set a budget according to real values from previous year). I wrote the following code, but it does not work. Writing the same constant value in the input fields is ok, but when I try to set it to the value coming from another cell it fails. I also tried using two different tables, no way..... The macro works for the first value, then it crashes.&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Paolo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Sub ResetInputFields&lt;BR /&gt;on error resume next&lt;BR /&gt; set budget = ActiveDocument.GetSheetObject( "BUDGET" )&lt;BR /&gt; for RowIter = RowIter to budget.GetRowCount-1&lt;BR /&gt; rif = budget.GetCell(RowIter,2).Number&lt;BR /&gt; budget.SetInputFieldCell RowIter,1,rif&lt;BR /&gt; next&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 17:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150583#M28568</guid>
      <dc:creator />
      <dc:date>2009-07-29T17:08:39Z</dc:date>
    </item>
    <item>
      <title>AW:SetInputFieldCell usage</title>
      <link>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150584#M28569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ciao Paolo,&lt;/P&gt;&lt;P&gt;I tried around a little and found out the following.&lt;BR /&gt;First: if you have not suppressed the header row in a table box, GetRowCount delivers the number of data rows+1. If you have e. g. 5 data rows, GetRowCount delivers 6 if header row not suppressed. So to read the desired cellvalue (with header row NOT suppressed!!), you have to pick cell values from 1 (0 is the header row) to GetRowCount-1 (which in my example is 5).&lt;BR /&gt;Second: the inputfield rows do NOT count the header row !! That means to set the value of the inputfield of the first data row to the value of column 3 of the SAME data row you must in your example use "budget.SetInputFieldCell 0, 1, budget.Cell(1,2).Number!&lt;BR /&gt;It's a bit ***, but it's important to note the difference in row handling betwen inputfields and "normal fields" and the header row problem. I have enclosed a small example in which the thing should work. Hope its understandable and helps,&lt;/P&gt;&lt;P&gt;Saluti,&lt;BR /&gt;Joachim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 15:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150584#M28569</guid>
      <dc:creator>biester</dc:creator>
      <dc:date>2009-08-19T15:25:40Z</dc:date>
    </item>
    <item>
      <title>AW:SetInputFieldCell usage</title>
      <link>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150585#M28570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ciao Joachim,&lt;/P&gt;&lt;P&gt;yes, this brings me much closer to the solution. My object is actually a Pivot Table and in this case this is not yet working. But now I think I can handle that.&lt;/P&gt;&lt;P&gt;Thanks! Bye.&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2009 17:34:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150585#M28570</guid>
      <dc:creator />
      <dc:date>2009-08-27T17:34:54Z</dc:date>
    </item>
    <item>
      <title>SetInputFieldCell usage</title>
      <link>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150586#M28571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for helping me out with that! I was getting so frustrated with setinputfieldvalue on a tablebox!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2011 23:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SetInputFieldCell-usage/m-p/150586#M28571</guid>
      <dc:creator />
      <dc:date>2011-06-09T23:06:19Z</dc:date>
    </item>
  </channel>
</rss>

