<?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: Assigning variable value to a field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139455#M373636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I am glad you got what you wanted, but I am not sure if you tried what I proposed. Should have been an easier alternative, unless you like to complicated stuff &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Aug 2016 23:29:35 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-08-20T23:29:35Z</dc:date>
    <item>
      <title>Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139450#M373631</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;How do I assign the value of a variable to a field?&lt;/P&gt;&lt;P&gt;The scenario is - I need to Clear the selections made in only Year, Month and Day fields when I move to tab X, and when I move out of tab X the selections that were made when I moved to tab X has to be restored.&lt;/P&gt;&lt;P&gt;For this I am using triggers,&lt;/P&gt;&lt;P&gt;On activation of tab X:&lt;/P&gt;&lt;P&gt;1. Assigning the selections (Getfieldselections()) in Year, Month &amp;amp; Day Field to variables vYear, vMonth and vDay respectively&lt;/P&gt;&lt;P&gt;2. Clearing the selections of Year, Month &amp;amp; Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On leaving tab X:&lt;/P&gt;&lt;P&gt;1. Assigning the values in vYear, vMonth and vDay to Year, Month &amp;amp; Day fields respectively&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine if there was only 1 selection that was made in Year, Month or Day field. But if multiple selections were made, the value that is assigned to the variables are different. for eg. when (Mar, Apr, May, Jun, Jul, Aug, Sep) are chosen in the field Month, the values that is assigned to the variable is (NOT Jan, Feb, Oct, Nov, Dec). Similarly with the Day, when 7 values are chose, (7 of 31) is assigned to the variable instead of (1,2,3,4,5,6,7) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how I can go about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 09:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139450#M373631</guid>
      <dc:creator>divya_anand</dc:creator>
      <dc:date>2016-08-19T09:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139451#M373632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to use the arguments available within GetFieldSelections() function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135008_Capture.PNG" style="font-size: 13.3333px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GetFieldSelections(Month, ',', 10000)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will ensure that your selections don't turn into nots or 5 of 10000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note: Make sure to increase the max_values accordingly if you have more than 10000 possible selections in the field you are using it for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 12:21:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139451#M373632</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-19T12:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139452#M373633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Divya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vYear = If(GetSelectedCount(Year)=0,'',&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(GetSelectedCount(Year) = 1, Year, '('&amp;amp;Concat(DISTINCT Year,'|')&amp;amp;')'))&lt;/P&gt;&lt;P&gt;vMonth = If(GetSelectedCount(Month)=0,'',&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(GetSelectedCount(Month) = 1, Year, '('&amp;amp;Concat(DISTINCT Month,'|')&amp;amp;')'))&lt;/P&gt;&lt;P&gt;vDay = If(GetSelectedCount(Day)=0,'',&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(GetSelectedCount(Day) = 1, Year, '('&amp;amp;Concat(DISTINCT Day,'|')&amp;amp;')'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 12:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139452#M373633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-19T12:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139453#M373634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Divya!&lt;/P&gt;&lt;P&gt;You could also try alternate states.&lt;/P&gt;&lt;P&gt;Therefor you would put the objects of the different tabs in two different states in order that they simply don't react to each other. That means the selections would not have to be cleared and restored as they only work for the objects in the same state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards Katharina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 12:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139453#M373634</guid>
      <dc:creator>katharinakostka</dc:creator>
      <dc:date>2016-08-19T12:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139454#M373635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked perfectly fine for me, just that there was a typo in the expression for vDay (It is suppose to be Day and not Year). I have another question, is it possible to use "," as delimiter? Would it still work? I tried, but doesn't work if I replace "|" with "," in the expression. The reason I'm asking you this is - I would like to see the Selections separated by comma in the "Current Selections" box unlike what I have now (Refer to the snapshot below)&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135077_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2016 06:18:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139454#M373635</guid>
      <dc:creator>divya_anand</dc:creator>
      <dc:date>2016-08-20T06:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139455#M373636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I am glad you got what you wanted, but I am not sure if you tried what I proposed. Should have been an easier alternative, unless you like to complicated stuff &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Aug 2016 23:29:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139455#M373636</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-20T23:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139456#M373637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this on the first hand, dint work for me. When I make more than 1 selection in Year/Month/Day, and when I open tab X and switch to a different tab, everything was getting deselected. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Aug 2016 13:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139456#M373637</guid>
      <dc:creator>divya_anand</dc:creator>
      <dc:date>2016-08-21T13:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Assigning variable value to a field?</title>
      <link>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139457#M373638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Divya, for select you have to use '|' instead ',' on vars.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 06:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Assigning-variable-value-to-a-field/m-p/1139457#M373638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-22T06:04:42Z</dc:date>
    </item>
  </channel>
</rss>

