<?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: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481457#M179910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works! Thanks!&amp;nbsp; Now for a quick find/replace in the xml file &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/cool.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Nov 2013 20:59:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-05T20:59:15Z</dc:date>
    <item>
      <title>Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481451#M179904</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 have two calendars and two sheets on a report.&amp;nbsp; One sheet looks at "Leads" table and uses the Leads Calendar.&amp;nbsp; The other sheet looks at "Legs" table and uses the Legs Calendar.&amp;nbsp; After reading through several discussions,&amp;nbsp; I figured out a solution that copies all the calendar selections form Leads fields to Legs fields, and it works quite well, but it has a slight cosmetic issue in the Current Selections Box...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After following some other discussions, I found this solution to work for the most part:&lt;/P&gt;&lt;P&gt;On the Legs Sheet, I have the following triggers:&lt;/P&gt;&lt;P&gt;OnActivateSheet --&amp;gt; "Select in Field" --&amp;gt; Field: "Legs.CalendarYear" --&amp;gt; Search string:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= '(' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;getfieldselections&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Leads.CalendarYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'|', 100) &amp;amp; ')' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I also have it clear the Leads.CalendarYear, of course.&lt;/P&gt;&lt;P&gt;OnLeaveSheet --&amp;gt; "Select in Field" --&amp;gt; Field: "Leads.CalendarYear" --&amp;gt; Search string:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= '(' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;getfieldselections&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Legs.CalendarYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'|', 100) &amp;amp; ')' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...and clear the Legs.CalendarYear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution perfectly copies the Leads Calendar selections into the Legs, and likewise.&amp;nbsp; However, when going back and forth between sheets, I see the Current Selections start to explode with parentheses. For Example, if I have 2012 and 2013 selected, I will eventually see (((((2012|2013))))) in the Current selections.&amp;nbsp; It technically doesn't hurt anything, but it is cosmetically annoying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried this from another discussion (I think it was Rob's favorite &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;), but it did not work at all for some reason:&lt;/P&gt;&lt;P&gt;OnActivateSheet --&amp;gt; "Select in Field" --&amp;gt; Field: "Legs.CalendarYear" --&amp;gt; Search string:&lt;/P&gt;&lt;P&gt;='=sum({&amp;lt;[Legs.CalendarYear]=[Leads.CalendarYear]&amp;gt;}1)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I must note that this solution allowed me to completely avoid Calendar Islands or linked tables to manage multiple calendars in a report. Customers of the report are extremely pleased with this solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 17:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481451#M179904</guid>
      <dc:creator />
      <dc:date>2013-11-05T17:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481452#M179905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of GetFieldSelections(), use Concat().&amp;nbsp; You shouldn't have the parentheses problem then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= '(' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Legs.CalendarYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,'|') &amp;amp; ')' &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 19:19:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481452#M179905</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-11-05T19:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481453#M179906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicole.&amp;nbsp; I just tried this and it is extremely slow for some reason.&amp;nbsp; Also, the Current Selections is now a strange black blur next to Legs.CalendarYear, like a ton of characters overlapping each other.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 19:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481453#M179906</guid>
      <dc:creator />
      <dc:date>2013-11-05T19:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481454#M179907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a sample .qvw with scrambled data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 19:33:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481454#M179907</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-11-05T19:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481455#M179908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here ya go.&amp;nbsp; It appears your solution works if there are only a few records.&amp;nbsp; My Leads and Legs Tables are around 1 million rows each, and that seems to tank the Concatenate solution.&amp;nbsp; I also just noticed that if you have nothing selected, the concatenate solution will still select all possible fields in the other table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see enclosed. Reload to generate the data, of course &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 20:44:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481455#M179908</guid>
      <dc:creator />
      <dc:date>2013-11-05T20:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481456#M179909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=if(GetSelectedCount(Leads.CalendarYear)&amp;gt;0, '(' &amp;amp; Concat(distinct Leads.CalendarYear,'|') &amp;amp; ')' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(GetSelectedCount(Legs.CalendarYear)&amp;gt;0, '(' &amp;amp; Concat(distinct Legs.CalendarYear,'|') &amp;amp; ')' )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 20:51:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481456#M179909</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-11-05T20:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481457#M179910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works! Thanks!&amp;nbsp; Now for a quick find/replace in the xml file &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/cool.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2013 20:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/481457#M179910</guid>
      <dc:creator />
      <dc:date>2013-11-05T20:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger Copy Field Selection to another Fields on Sheet Select (Almost works...)</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/2516030#M1226516</link>
      <description>&lt;P&gt;Commenting on this old post to add in case anyone else ends up with my situation. Basically, I have four different date fields and want the user to be able to switch between them but want any applied selections to be copied to the newly selected date field when they're switched (and the old selection removed so that there aren't any issues with multiple date fields being applied simultaneously). The way I've gotten around this is to create a variable, vDateSelections, that stores the current selection from any of the other three fields if any are applied. For example, if Date option number 2 is selected, the variable is set like this:&lt;/P&gt;&lt;P&gt;if(getselectedcount([Date1]) &amp;gt;0, '(' &amp;amp; concat(distinct [Date1],'|') &amp;amp; ')',&lt;BR /&gt;if(getselectedcount([Date3]) &amp;gt;0, '(' &amp;amp; concat(distinct [Date3],'|') &amp;amp; ')',&lt;BR /&gt;if(getselectedcount([Date4]) &amp;gt;0, '(' &amp;amp; concat(distinct [Date4],'|') &amp;amp; ')',&lt;BR /&gt;)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I have an action to clear the field selections for date1, date3, and date4 (since again I do not want users to be able to have different date type selections applied simultaneously since things can get messy that way).&lt;/P&gt;&lt;P&gt;Last, I just set the new date field based on the variable value, vDateSelections, using a "toggle field selection" action (I was passing this directly but qlik seemed to be getting confused between the different dates and this ensured it's being set based on the variable values set at the beginning of the action).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set all of these actions for each date button to ensure everything stays mutually exclusive that way. Hope this helps!&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;!--  
        Versioning Control Panel if versioning = true !
      --&gt;&lt;!--  
        Launcher
      --&gt;&lt;!--   Toolbar   --&gt;&lt;!--  
        Site Menu
      --&gt;&lt;!--  
        Generic Aria Live message container
      --&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;!--   Symbol definitions   --&gt;&lt;/DIV&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Mon, 28 Apr 2025 14:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-Copy-Field-Selection-to-another-Fields-on-Sheet-Select/m-p/2516030#M1226516</guid>
      <dc:creator>mlgross</dc:creator>
      <dc:date>2025-04-28T14:35:31Z</dc:date>
    </item>
  </channel>
</rss>

