<?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 input field - set input field values using Macros in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907884#M315332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to develop a solution using &lt;STRONG&gt;inputfield &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;but it seems it doesn't work as I need.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In few words, in my app I've declared the input field in the load part and in the front-end the expression is inputsum(inputfieldname).&lt;/P&gt;&lt;P&gt;The user enters the "InputField Total" (ex. 30 000) and the value is distributed proportionaly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;My goal is to make expression 3 editable, which looks like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;= sum(DefaultValue) &lt;/EM&gt;&lt;EM&gt;+ &lt;/EM&gt;&lt;EM&gt;sum(total&amp;lt;MONTH,FIELD_X,FIELD_Y&amp;gt; &lt;STRONG&gt;inputfield_name&lt;/STRONG&gt; - DefaultValue)/12&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture inputfield example.JPG" class="jive-image image-1" src="/legacyfs/online/94805_Capture inputfield example.JPG" style="height: 356px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;Now, only the second expression ( inputsum(inputfieldname) ) is editable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I'm thinking of create a macro that takes the values from expression 3 and inserting them into the inputfield.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I found something like fld.SetInputFieldCell or fld.SetInputFieldValue, but I've managed to make them work only for static values, not taking into consideration another expression.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sub SetInputFeild&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set fld = ActiveDocument.Fields("inputfield_name")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fld.SetInputFieldValue 0, "999" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;End SUB&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Any ideas would be helpful &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Silviu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2015 08:57:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-03T08:57:56Z</dc:date>
    <item>
      <title>input field - set input field values using Macros</title>
      <link>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907884#M315332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to develop a solution using &lt;STRONG&gt;inputfield &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;but it seems it doesn't work as I need.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In few words, in my app I've declared the input field in the load part and in the front-end the expression is inputsum(inputfieldname).&lt;/P&gt;&lt;P&gt;The user enters the "InputField Total" (ex. 30 000) and the value is distributed proportionaly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;My goal is to make expression 3 editable, which looks like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;= sum(DefaultValue) &lt;/EM&gt;&lt;EM&gt;+ &lt;/EM&gt;&lt;EM&gt;sum(total&amp;lt;MONTH,FIELD_X,FIELD_Y&amp;gt; &lt;STRONG&gt;inputfield_name&lt;/STRONG&gt; - DefaultValue)/12&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture inputfield example.JPG" class="jive-image image-1" src="/legacyfs/online/94805_Capture inputfield example.JPG" style="height: 356px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;Now, only the second expression ( inputsum(inputfieldname) ) is editable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I'm thinking of create a macro that takes the values from expression 3 and inserting them into the inputfield.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I found something like fld.SetInputFieldCell or fld.SetInputFieldValue, but I've managed to make them work only for static values, not taking into consideration another expression.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sub SetInputFeild&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set fld = ActiveDocument.Fields("inputfield_name")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;fld.SetInputFieldValue 0, "999" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;End SUB&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Any ideas would be helpful &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Silviu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 08:57:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907884#M315332</guid>
      <dc:creator />
      <dc:date>2015-08-03T08:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: input field - set input field values using Macros</title>
      <link>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907885#M315333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that a macro-approach would be useful. Unfortunately I didn't understand what your expression is calculating - you could refer to your input-fields per label/column()/direct expression and also use advanced aggregations with total-qualifier and aggr() functions - but if there are anything else as inputsum() within the expression they wouldn't be editable anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need further editable functionalities then you will need to use more inputfields, maybe in another scaling. Inputfields are good for simple use-cases - if it goes to more complex (forecasting) models it will be quite difficult and other solutions might be more suitable: &lt;A href="https://community.qlik.com/docs/DOC-5970"&gt;SQL Writeback from QlikView extension object.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 11:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907885#M315333</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-03T11:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: input field - set input field values using Macros</title>
      <link>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907886#M315334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am still unclear what you are trying to do but here is a macro I use with inputfields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB ToggleInputOn2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET fx = ActiveDocument.Fields("MitigationID")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET fxV = fx.GetSelectedValues&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fxV.Count=1 then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set fld = ActiveDocument.Fields("Checked")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fld.SetInputFieldValue ((fxV(i).Text)-1),"YES"&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;END SUB &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one checks that there is just one selected value in the field MitigationID.&amp;nbsp; If there is then it sets the field Checked to YES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my front end if the value of the input field =YES it displays an image of a check in the straight table Chart column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also use this to toggle all checks on or off:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub SetEm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set fld = ActiveDocument.Fields("Checked")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for a=0 to 62&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fld.SetInputFieldValue A,"YES"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;sub ClearAll&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set fld = ActiveDocument.Fields("Checked")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fld.ResetInputFieldValues 0, 0 ' 0 = All values reset, 1 = Reset Possible value, 2 = Reset single value&lt;/P&gt;&lt;P&gt;end sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&amp;nbsp; If not please give more details on what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I have heard that Macros will not be continued in QV 12 - not sure if that's true just mentioning what I heard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 13:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/input-field-set-input-field-values-using-Macros/m-p/907886#M315334</guid>
      <dc:creator>dgreenberg</dc:creator>
      <dc:date>2015-08-03T13:01:14Z</dc:date>
    </item>
  </channel>
</rss>

