<?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: Variable used in bookmark returns string when using  GetFieldSelections() in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007094#M83337</link>
    <description>&lt;P&gt;Yay, looks like only(Year) did the trick for me!&lt;/P&gt;
&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2022 14:34:32 GMT</pubDate>
    <dc:creator>Felix_Koch</dc:creator>
    <dc:date>2022-11-21T14:34:32Z</dc:date>
    <item>
      <title>Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2006978#M83320</link>
      <description>&lt;P&gt;Hi Qlik Community&lt;/P&gt;
&lt;P&gt;I have&amp;nbsp;used a variable for selection of current year in an application: '&lt;SPAN&gt;=Year=$(vCurrentYear)'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;vCurrentYear is defined i&lt;/SPAN&gt;n the data load editor: 'set vCurrentYear = year(today());'&lt;/P&gt;
&lt;P&gt;I have a number of KPI's that rely on which year is currentyly selected. I use GetFieldSelections(Year) for this. However, when the default bookmark is applied the KPIs don't work, as the set analysis then returns a string for&amp;nbsp;GetFieldSelections(Year).&lt;/P&gt;
&lt;P&gt;Is there a smart way to have the current year automatically selected by the default bookmark but also being able to reference the year that's currently selected in the Year filter?&lt;/P&gt;
&lt;P&gt;Br.&lt;/P&gt;
&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2006978#M83320</guid>
      <dc:creator>Felix_Koch</dc:creator>
      <dc:date>2022-11-21T13:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2006983#M83321</link>
      <description>&lt;P&gt;I'm not sure I followed that correctly, but if I did, perhaps Coalesce(GetFieldSelections(Year), $(vCurrentYear))? This will use a selection if one exists, and otherwise use whatever is in the variable. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 12:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2006983#M83321</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-11-21T12:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007036#M83327</link>
      <description>&lt;P&gt;Hi Or&lt;/P&gt;
&lt;P&gt;I didn't know that function, really cool!&lt;/P&gt;
&lt;P&gt;However, I think the issue remains the same.&amp;nbsp;&lt;SPAN&gt;Coalesce(GetFieldSelections(Year), $(vCurrentYear)) returns '=Year=$(vCurrentYear)' when the abovementioned bookmark is applied. Apparently a strings is still recognized as a "valid&amp;nbsp;non-NULL&amp;nbsp;representation" for the 'Coalesce' function.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007036#M83327</guid>
      <dc:creator>Felix_Koch</dc:creator>
      <dc:date>2022-11-21T13:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007042#M83329</link>
      <description>&lt;P&gt;I am a tad confused here - a default bookmark is applied before any user selections can be made, so how would the field selections even come into play in this regard? Shouldn't you just use =Year=Year(Today()) for the bookmark?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:22:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007042#M83329</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-11-21T13:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007052#M83332</link>
      <description>&lt;P&gt;Maybe my explanation is just a bit unclear, I'll give it another go based on your point regarding the bookmark.&lt;/P&gt;
&lt;P&gt;There is a default bookmark that selects the current year:&amp;nbsp;&lt;SPAN&gt;=Year=Year(Today()).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then there's a number of KPIs. Most of the KPI's show changes in amounts relative to Dec-PreviousYear. In order for the KPIs to understand which year is the previous year, they need to understand which year is currently selected (2022 should be compared&amp;nbsp;to dec-2021 and 2021 should be compared to dec-2020). That part works when a year is manually selected, but when the bookmark is applied, the value returned for Year is&amp;nbsp;=Year=Year(Today()) instead of 2022.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hopefully the problem makes a bit more sense now.&amp;nbsp; Otherwise please let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007052#M83332</guid>
      <dc:creator>Felix_Koch</dc:creator>
      <dc:date>2022-11-21T13:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007070#M83335</link>
      <description>&lt;P&gt;Based on that explanation, shouldn't your KPIs just refer to Year directly? It seems that you require a single year to be selected, so you could just refer to the field rather than look at the selection (or you could use Only(Year) if you want to be explicit)...&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007070#M83335</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-11-21T13:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Variable used in bookmark returns string when using  GetFieldSelections()</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007094#M83337</link>
      <description>&lt;P&gt;Yay, looks like only(Year) did the trick for me!&lt;/P&gt;
&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 14:34:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-used-in-bookmark-returns-string-when-using/m-p/2007094#M83337</guid>
      <dc:creator>Felix_Koch</dc:creator>
      <dc:date>2022-11-21T14:34:32Z</dc:date>
    </item>
  </channel>
</rss>

