<?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: Re: Set field from variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530723#M548890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I know what the problem is.&lt;/P&gt;&lt;P&gt;I was trying something else and I forgot to remove the triggers. Go on the document properties and remove the triggers from Prod1 also go on the Select button and change the field from Prod1 to Prod2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2014 18:44:29 GMT</pubDate>
    <dc:creator>iktrayanov</dc:creator>
    <dc:date>2014-01-17T18:44:29Z</dc:date>
    <item>
      <title>Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530714#M548881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to save the selections in a field upon entering sheet1.&amp;nbsp; Then I want to manually change the selections in that field.&amp;nbsp; Then upon leaving sheet1 I want to restore the original selections that I saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this by GetFieldSelections and storing the result in a variable.&amp;nbsp; These are years by the way.&amp;nbsp; This results in a comma separated list.&amp;nbsp; Then I change the years to what is appropriate for Sheet1.&amp;nbsp; Then when I leave sheet1 I want to put the original list of years that I saved back into the field.&amp;nbsp; I tried doing this by taking the comma separated list, adding leading and trailing parentheses and replaced the commas with pipes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work.&amp;nbsp; Does anyone have any suggestions?&amp;nbsp; Maybe a better way to be able to restore the values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 17:06:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530714#M548881</guid>
      <dc:creator />
      <dc:date>2014-01-17T17:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530715#M548882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a bookmark per sheet and use the OnLeave and OnActivate sheet triggers to save (replace) the bookmark when leaving the sheet and activating the bookmark when entering the sheet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 17:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530715#M548882</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-01-17T17:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530716#M548883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So this (2010|2011|2012) does not work&lt;/P&gt;&lt;P&gt;Try to make your search string like this (*2010*|*2011*|*2012*)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 17:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530716#M548883</guid>
      <dc:creator>iktrayanov</dc:creator>
      <dc:date>2014-01-17T17:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530717#M548884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks that works.&amp;nbsp; I'm also going to try Ivan's solution to see if that will let me restore only certain fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 17:38:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530717#M548884</guid>
      <dc:creator />
      <dc:date>2014-01-17T17:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530718#M548885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ivan,&amp;nbsp; my search string was as you supposed.&amp;nbsp; I changed it as you suggested, but it didn't work.&amp;nbsp; When I go back to another sheet all years are de-selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 17:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530718#M548885</guid>
      <dc:creator />
      <dc:date>2014-01-17T17:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530719#M548886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to double check how you set your actions. It should work.&lt;/P&gt;&lt;P&gt;See the attached example. I created a button SetVariable that holds your selections and after changing selections another button Select that selects your saved selections. Take a look at the actions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 17:57:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530719#M548886</guid>
      <dc:creator>iktrayanov</dc:creator>
      <dc:date>2014-01-17T17:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530720#M548887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It partially works.&amp;nbsp; Once the variable starts displaying things like "All" or "Not A" it no longer works.&amp;nbsp; I added a few rows to your example to test this out.&amp;nbsp; Is there a way to fix this?&amp;nbsp; By the way, the difference between your suggestion and what I did originally was I used "$" in front of the variable name to expand it, which didn't work.&amp;nbsp; Once I saw that you didn't have a "$" in your example, I took it out and it worked, up until the variable displayed things like Not A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 18:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530720#M548887</guid>
      <dc:creator />
      <dc:date>2014-01-17T18:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530721#M548888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you attach your example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 18:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530721#M548888</guid>
      <dc:creator>iktrayanov</dc:creator>
      <dc:date>2014-01-17T18:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530722#M548889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is your example with a few more rows.&amp;nbsp; If I select say, all rows except A, set the variable, then make a different selection and then click Select, it doesn't use the variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 18:37:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530722#M548889</guid>
      <dc:creator />
      <dc:date>2014-01-17T18:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530723#M548890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I know what the problem is.&lt;/P&gt;&lt;P&gt;I was trying something else and I forgot to remove the triggers. Go on the document properties and remove the triggers from Prod1 also go on the Select button and change the field from Prod1 to Prod2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 18:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530723#M548890</guid>
      <dc:creator>iktrayanov</dc:creator>
      <dc:date>2014-01-17T18:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530724#M548891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did as you suggested and the problem still remains.&amp;nbsp; I appreciate the time you've been putting into this.&amp;nbsp; I've attached my altered version of your example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 18:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530724#M548891</guid>
      <dc:creator />
      <dc:date>2014-01-17T18:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530725#M548892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I found the problem.&amp;nbsp; There is a default value of 6 on GetFieldSelections for how many values it will display.&amp;nbsp; So if I increase the maximum above 6, your example works.&amp;nbsp; Also, you can put the pipe directly in the GetFieldSelections function.&amp;nbsp; I'm going to try it on my actual data.&amp;nbsp; Hopefully it will work.&amp;nbsp; Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 18:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530725#M548892</guid>
      <dc:creator />
      <dc:date>2014-01-17T18:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Set field from variable</title>
      <link>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530726#M548893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use the concat function instead, this way you dont have worry about setting the max.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='('&amp;amp;concat(Prod2, '|')&amp;amp;')'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 20:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-field-from-variable/m-p/530726#M548893</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-01-17T20:18:15Z</dc:date>
    </item>
  </channel>
</rss>

