<?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 Custom Visual Filter - Desktop - LocalStorage Problem in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Filter-Desktop-LocalStorage-Problem/m-p/2175906#M32775</link>
    <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i developed an custom filter for iso calender weeks for my company.&lt;/P&gt;&lt;P&gt;It works very well, but iam not able to save the current filter to the localstorage. It seems to work on the web but not in the desktop version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import ILocalVisualStorageService = powerbi.extensibility.ILocalVisualStorageService;



constructor(options: VisualConstructorOptions){
    this.storage = options.host.storageService;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my first update cycle i check for the localstorage and set if&amp;nbsp;necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//to get data in async function
let cache = await this.storage.get("filter");


//to set data in async function
await this.storage.set("filter", "xyz");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use the localstorage&amp;nbsp; in Desktop?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;</description>
    <pubDate>Sat, 06 Nov 2021 15:49:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-11-06T15:49:52Z</dc:date>
    <item>
      <title>Custom Visual Filter - Desktop - LocalStorage Problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Filter-Desktop-LocalStorage-Problem/m-p/2175906#M32775</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i developed an custom filter for iso calender weeks for my company.&lt;/P&gt;&lt;P&gt;It works very well, but iam not able to save the current filter to the localstorage. It seems to work on the web but not in the desktop version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import ILocalVisualStorageService = powerbi.extensibility.ILocalVisualStorageService;



constructor(options: VisualConstructorOptions){
    this.storage = options.host.storageService;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my first update cycle i check for the localstorage and set if&amp;nbsp;necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//to get data in async function
let cache = await this.storage.get("filter");


//to set data in async function
await this.storage.set("filter", "xyz");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use the localstorage&amp;nbsp; in Desktop?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;</description>
      <pubDate>Sat, 06 Nov 2021 15:49:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Filter-Desktop-LocalStorage-Problem/m-p/2175906#M32775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-06T15:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual Filter - Desktop - LocalStorage Problem</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Filter-Desktop-LocalStorage-Problem/m-p/2176905#M32779</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous,&lt;/P&gt;
&lt;P&gt;I personally haven't tried it in Desktop, but does your visual &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/local-storage#considerations-and-limitations" target="_self"&gt;meet the requirements&lt;/A&gt; for being able to use the API? The two key ones are that it must be in AppSource and certified. If so, then it should be a case of emailing the team to request access on a per visual basis.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 02:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Filter-Desktop-LocalStorage-Problem/m-p/2176905#M32779</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-11-08T02:44:38Z</dc:date>
    </item>
  </channel>
</rss>

