<?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 Reset inputfield to initial value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145094#M23884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Etay, sorry so late in replying. Here's the macro that works for me. The field I'm resetting is "LiabDetail.Will_Pay".&lt;/P&gt;&lt;P&gt;sub Reload&lt;BR /&gt; ActiveDocument.ReloadEx 1,2&lt;BR /&gt; set f = ActiveDocument.Fields("LiabDetail.Will_Pay")&lt;BR /&gt; f.ResetInputFieldValues 0&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Dino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jul 2009 19:54:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-27T19:54:42Z</dc:date>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145088#M23878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm having a problem using the InputField function. Basically, I have a Yes/No field (it's really a text field with either "Y" or "N") that I load twice, once normally ("To_Pay") and and again as an Input Field ("Will_Pay"). The purpose for the field is to indicate whether a payment should be made. The idea is that the user can see what the source file has and override it if necessary via the second instance of the field. The resulting table will show only the overrides and will eventually be used to update the originating program. It works but I seem to be having a few challenges:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If I reload from the same or similar data, some of the changes to the input field seem to persist. I would have expected them to reset back to the original values on a reload.&lt;/LI&gt;&lt;LI&gt;I would like to create a command button to reset Will_Pay on all rows to the original value from To_Pay, in case things get so messed up it would be easier to start over. I suppose if #1 gets fixed, that might a way to do this, too.&lt;/LI&gt;&lt;LI&gt;When I use both fields in a multi-box, the drop-down for To_Pay shows only one of each Y or N as expected, but the drop-down for Will_Pay shows many Ys and Ns. I haven't counted but I'm guessing it's one for each row.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Any ideas, or am I just trying to use this in a different way than it was intended?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Dino&lt;/P&gt;&lt;P&gt;BTW, I'm using 8.01, planning to use 8.50 soon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 03:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145088#M23878</guid>
      <dc:creator />
      <dc:date>2009-05-27T03:23:46Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145089#M23879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Dino Bekas wrote:If I reload from the same or similar data, some of the changes to the input field seem to persist. I would have expected them to reset back to the original values on a reload.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Correct, Input Fields are designed to survive reload. There is a problem, however... The Input Field values are not linked to the logical keys, but rather to the Row number. If you reload new data, and some of the new rows get inserted between the old rows, the entered values will get attached to the wrong keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Dino Bekas wrote:I would like to create a command button to reset Will_Pay on all rows to the original value from To_Pay, in case things get so messed up it would be easier to start over. I suppose if #1 gets fixed, that might a way to do this, too.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Yes, you can use APIs to reset inputfield values. Look in the API Guide for a member "ResetInputFieldValues".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;Dino Bekas wrote:When I use both fields in a multi-box, the drop-down for To_Pay shows only one of each Y or N as expected, but the drop-down for Will_Pay shows many Ys and Ns. I haven't counted but I'm guessing it's one for each row.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Yes, unfortunately this is how it seems to work... I found the following "work around" - create a list box with the calculated Expression - for example, left(myInputField, 1). This seems to work correctly - only distinct values are displayed, and the selection works as expected.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 11:46:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145089#M23879</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-05-27T11:46:16Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145090#M23880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the explanation, Oleg. Unfortunately, I don't seem to know enough about using the API guide to understand ResetInputFieldValues. I tried to use the example provided but get some sort of parsing error whenver I try to save.&lt;/P&gt;&lt;P&gt;Also, I can't figure out how to create a calculated field in a list box. I can create one in a chart, but not a list box.&lt;/P&gt;&lt;P&gt;Sorry to be so dumb...&lt;BR /&gt;Dino&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 20:03:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145090#M23880</guid>
      <dc:creator />
      <dc:date>2009-05-27T20:03:58Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145091#M23881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dino You can create the calculated field in the list box by&lt;/P&gt;&lt;P&gt;right click on the qlikview document and select New sheet object then list box and in general tab on fields drop down list select expression from the list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Talha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 20:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145091#M23881</guid>
      <dc:creator />
      <dc:date>2009-05-27T20:12:30Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145092#M23882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, the macro did it, as well as the list box idea. Thanks to both of you...&lt;/P&gt;&lt;P&gt;Dino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 20:48:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145092#M23882</guid>
      <dc:creator />
      <dc:date>2009-05-28T20:48:38Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145093#M23883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Dino&lt;/P&gt;&lt;P&gt;I have seen your discussion and am stuck with the same problem.&lt;/P&gt;&lt;P&gt;Can you send me the macro that evenually worked ??&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Etay Elazar&lt;/P&gt;&lt;P&gt;QlikView-Israel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 20:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145093#M23883</guid>
      <dc:creator>etay_netintent</dc:creator>
      <dc:date>2009-07-22T20:27:55Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145094#M23884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Etay, sorry so late in replying. Here's the macro that works for me. The field I'm resetting is "LiabDetail.Will_Pay".&lt;/P&gt;&lt;P&gt;sub Reload&lt;BR /&gt; ActiveDocument.ReloadEx 1,2&lt;BR /&gt; set f = ActiveDocument.Fields("LiabDetail.Will_Pay")&lt;BR /&gt; f.ResetInputFieldValues 0&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;Dino&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2009 19:54:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145094#M23884</guid>
      <dc:creator />
      <dc:date>2009-07-27T19:54:42Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145095#M23885</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;The problem with teh API example is - as I understand - that it resets a single value.&lt;/P&gt;&lt;P&gt;You would like to reset all values - I presume:&lt;/P&gt;&lt;P&gt;sub resetinput&lt;BR /&gt;dim x(1)&lt;BR /&gt;x(0) = 0 ' element to reset&lt;BR /&gt;set fld = ActiveDocument.Fields("Index_Pris_Simulering")&lt;BR /&gt;fld.ResetInputFieldValues 0, x ' 0 = All values reset, 1 = Reset Possible value, 2 = Reset single value&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Klaus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2009 20:45:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145095#M23885</guid>
      <dc:creator>klausskalts</dc:creator>
      <dc:date>2009-12-29T20:45:39Z</dc:date>
    </item>
    <item>
      <title>Reset inputfield to initial value</title>
      <link>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145096#M23886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've seen your discussion and i'm also facing the same problem. I've developed my qvw file with below script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INPUTFIELD MinTakeOver,MaxTakeOver;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;TakeOver:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&amp;nbsp; TakeOver,MinTakeOver, MaxTakeOver, MinTakeOver as MinTakeOver1, MaxTakeOver as MaxTakeOver1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD 'BCButtterflyTimeA' as TakeOver,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;max(BCButtterflyTimeA) as MaxTakeOver,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;min(BCButtterflyTimeA) as MinTakeOver&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;From&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;T.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- I kept schedular for this file to reload every day for once. What i've seen is input fields are not updating with latest qvd data. It is holding previous qvd data only. As you said that input fields will not update but how can i over come this. B'coz in my application around 300 input fields are there. More over i'm using this input fields in tablebox to change and in listbox expression to see the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share your idea how to achive this. It is very urgent for me.. Other wise is there any way to achive.&lt;/P&gt;&lt;P&gt; whether possible or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 05:02:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reset-inputfield-to-initial-value/m-p/145096#M23886</guid>
      <dc:creator />
      <dc:date>2011-12-16T05:02:52Z</dc:date>
    </item>
  </channel>
</rss>

