<?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: Issue when using bookmark navigation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931632#M76764</link>
    <description>&lt;P&gt;Set your BudgetYear field expression to this and then create your bookmark.&amp;nbsp; I tested and it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=only({1} BudgetYear)=Year(AddYears(Today(), vOffset))&lt;/P&gt;</description>
    <pubDate>Tue, 17 May 2022 10:29:41 GMT</pubDate>
    <dc:creator>stevejoyce</dc:creator>
    <dc:date>2022-05-17T10:29:41Z</dc:date>
    <item>
      <title>Issue when using bookmark navigation</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931618#M76762</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm trying to implement a user friendly-navigation pattern using a combination of buttons and bookmarks but I'm running into some strange issues I cannot explain.&lt;/P&gt;
&lt;P&gt;When loading the application I create a variable vOffset which is initialized to 0.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET vOffset = 0;&lt;/LI-CODE&gt;
&lt;P&gt;The application has a default bookmark with a dynamic filter that uses the variable defined when loading the application data:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{&amp;lt;BudgetYear={"=BudgetYear=Year(AddYears(Today(), vOffset))"}&amp;gt;}&lt;/LI-CODE&gt;
&lt;P&gt;When the application is opened, the default bookmark sets the BudgetYear to 2022 as expected. As you can see in the screenshot, the value of vOffset is correctly initialized to 0.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="C4ppy_0-1652782038496.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79577i9AE4089B40A7042E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="C4ppy_0-1652782038496.png" alt="C4ppy_0-1652782038496.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Till this point all is going well. In order to provide easy navigation for the end-user, I also added 2 buttons to navigate over the different budget years.&lt;/P&gt;
&lt;P&gt;Both buttons contain 2 actions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The first action manipulates the value of vOffset (-1 or +1 depending on the button)&lt;/LI&gt;
&lt;LI&gt;The second action applies the BudgetYear bookmark&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The idea is that when clicking the back-button while the year is 2022, the value of vOffset is set to -1 and the bookmark is re-applied causing the filter to change into 2021.&lt;/P&gt;
&lt;P&gt;However, when clicking the button, the filter is cleared and all data is shown. Setting the value of vOffset has succeeded as indicated in the KPI control in the application.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="C4ppy_1-1652782334024.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79578iE620C1A3638C396E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="C4ppy_1-1652782334024.png" alt="C4ppy_1-1652782334024.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But it becomes even stranger. If you click the back-navigation a second time, the value of vOffset changes to -2 and the filter is applied correctly.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="C4ppy_2-1652782444782.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/79579iB2F5A2B7623766E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="C4ppy_2-1652782444782.png" alt="C4ppy_2-1652782444782.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So basically, the navigation buttons are working every second time you click them. In the other case the filter is cleared.&lt;/P&gt;
&lt;P&gt;Does anyone have a pointer to what may cause this strange behavior.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;Erwin&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 10:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931618#M76762</guid>
      <dc:creator>C4ppy</dc:creator>
      <dc:date>2022-05-17T10:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue when using bookmark navigation</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931632#M76764</link>
      <description>&lt;P&gt;Set your BudgetYear field expression to this and then create your bookmark.&amp;nbsp; I tested and it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=only({1} BudgetYear)=Year(AddYears(Today(), vOffset))&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 10:29:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931632#M76764</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2022-05-17T10:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue when using bookmark navigation</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931708#M76770</link>
      <description>&lt;P&gt;Thanks for the quick response!&lt;BR /&gt;Can you by any chance explain what I did wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 12:20:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931708#M76770</guid>
      <dc:creator>C4ppy</dc:creator>
      <dc:date>2022-05-17T12:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue when using bookmark navigation</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931778#M76782</link>
      <description>&lt;P&gt;i think its just a caveat to dynamic bookmark/expression.&amp;nbsp; if BudgetYear is set to 2021 already, and you are trying to set it to say 2022, just BudgetYear=2022 is going to return null so it clears the selection.&amp;nbsp; Then since your field is cleared the next action works.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When your field already has a selectiona nd you want to change it, using {1} makes sure it already isn't filtered.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 13:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-when-using-bookmark-navigation/m-p/1931778#M76782</guid>
      <dc:creator>stevejoyce</dc:creator>
      <dc:date>2022-05-17T13:38:11Z</dc:date>
    </item>
  </channel>
</rss>

