<?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: Dynamic Bookmark not working with existing selections in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2462258#M98950</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/196662"&gt;@Oliver_GER&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think you need to evaluate the search string because Qlik only uses actual search values when 'Always one selected value' is enabled, so it should work using something like this:&lt;/P&gt;
&lt;PRE&gt;={1}Year=$(=Only({1&amp;lt;User = {$(=subfield(osuser(),'=',-1))} &amp;gt;} DefaultYear))&lt;/PRE&gt;
&lt;P&gt;It's important that you create the bookmark before enabling 'Always one selected value', since doing so afterwards will only save the value itself and not the evaluated string.&lt;/P&gt;
&lt;P&gt;Let me know if this worked for you as well!&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 14:35:51 GMT</pubDate>
    <dc:creator>lennart_mo</dc:creator>
    <dc:date>2024-06-13T14:35:51Z</dc:date>
    <item>
      <title>Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461206#M98867</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;in the Datamodel I do have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Data:
load * inline [
Year
2023
2024
2025
];&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I filter for this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=Year=year(today())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After this I create a bookmark.&lt;/P&gt;
&lt;P&gt;Now there are two scenarios&lt;/P&gt;
&lt;P&gt;1) No filter is active and I apply the bookmark. ==&amp;gt; Result: 2024 is selected.&lt;/P&gt;
&lt;P&gt;2) Filter is set to 2023 and I apply the bookmark ==&amp;gt; Result: Filter is removed, but 2024 is *not* selected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a workaround for this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 11:13:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461206#M98867</guid>
      <dc:creator>Oliver_GER</dc:creator>
      <dc:date>2024-06-11T11:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461699#M98894</link>
      <description>&lt;P&gt;You may try it with:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=year(today())&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jun 2024 11:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461699#M98894</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-06-12T11:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461729#M98898</link>
      <description>&lt;P&gt;Using the following filter worked for me:&lt;/P&gt;
&lt;PRE&gt;={1}Year=year(today())&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 12:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461729#M98898</guid>
      <dc:creator>lennart_mo</dc:creator>
      <dc:date>2024-06-12T12:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461767#M98905</link>
      <description>&lt;P&gt;Thanks, that worked!&lt;/P&gt;
&lt;P&gt;I had tried something very similar before, but it did not work out:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=Year=year({1}today())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I have to adapt this to our current real-world problem. It does work, but only if the field is not set to "always one selected". I can't reproduce this issue with the year example, so I guess I will be able to solve this.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 14:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461767#M98905</guid>
      <dc:creator>Oliver_GER</dc:creator>
      <dc:date>2024-06-12T14:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461784#M98906</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/300891"&gt;@lennart_mo&lt;/a&gt;&amp;nbsp;- Unfortunately I am able to reproduce the issue with the basic setup:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Year:
load * inline [
Year
2022
2023
2024
2025
];

DefaultYear:
load * inline [
User , DefaultYear
A	        ,	2022
yourOSUser	,	2023
C	        ,	2024
D	        ,	2025
];&lt;/LI-CODE&gt;
&lt;P&gt;Testing this expression:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;only({&amp;lt;User = {$(=subfield(osuser(),'=',-1))} &amp;gt;} DefaultYear)&lt;/LI-CODE&gt;
&lt;P&gt;results in 2023 for my user. That is good.&lt;/P&gt;
&lt;P&gt;Using this in a bookmark / filter works, but only as long as Year-field is *NOT* set to "allways one selected value.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;={1}Year=only({1&amp;lt;User = {$(=subfield(osuser(),'=',-1))} &amp;gt;} DefaultYear)&lt;/LI-CODE&gt;
&lt;P&gt;Do you have any explanation, why this filter expressions works stops working once the field-setting is changed. And do you have any hint on how to solve this?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 14:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2461784#M98906</guid>
      <dc:creator>Oliver_GER</dc:creator>
      <dc:date>2024-06-12T14:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2462258#M98950</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/196662"&gt;@Oliver_GER&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think you need to evaluate the search string because Qlik only uses actual search values when 'Always one selected value' is enabled, so it should work using something like this:&lt;/P&gt;
&lt;PRE&gt;={1}Year=$(=Only({1&amp;lt;User = {$(=subfield(osuser(),'=',-1))} &amp;gt;} DefaultYear))&lt;/PRE&gt;
&lt;P&gt;It's important that you create the bookmark before enabling 'Always one selected value', since doing so afterwards will only save the value itself and not the evaluated string.&lt;/P&gt;
&lt;P&gt;Let me know if this worked for you as well!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 14:35:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2462258#M98950</guid>
      <dc:creator>lennart_mo</dc:creator>
      <dc:date>2024-06-13T14:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Bookmark not working with existing selections</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2465600#M99192</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/300891"&gt;@lennart_mo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;sorry for the late reply.&lt;/P&gt;
&lt;P&gt;I have used your Filter statement and stored it into a bookmark *before* enabling *allways one value selected. This is the statement stored in the bookmark:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{&amp;lt;Year={"={1}Year=$(=Only({1&amp;lt;User = {$(=subfield(osuser(),'=',-1))} &amp;gt;} DefaultYear))"}&amp;gt;}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bookmark works great when "allways one value selected" is disabled and continues working once it was enabled.&lt;/P&gt;
&lt;P&gt;I will now test this in my actual envirnoment to see if this actually solves the issue.&lt;/P&gt;
&lt;P&gt;Update: In my Real-world scenario it was a string and not a number. Therefore I had to add chr(39):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;={1}Language=$(=chr(39) &amp;amp; Only({1&amp;lt;User = {$(=subfield(osuser(),'=',-1))} &amp;gt;} DefaultLanguage) &amp;amp; chr(39))&lt;/LI-CODE&gt;
&lt;P&gt;This works for me! Thank you very, very much!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 08:20:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Bookmark-not-working-with-existing-selections/m-p/2465600#M99192</guid>
      <dc:creator>Oliver_GER</dc:creator>
      <dc:date>2024-06-26T08:20:41Z</dc:date>
    </item>
  </channel>
</rss>

