<?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: Applying Filters in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Applying-Filters/m-p/1996232#M30902</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a custom visual with an OpenLayers Map to better visualise spatial data. So far I've managed to filter and select data in other visuals and have the OpenLayers map react to the selection/filter (It zooms and highlights the selected data).&amp;nbsp;The next is to be able to select something on the openLayers map and filter the other visuals.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am however unable to apply a selection with the selectionmanager or a filter with the JSONFilter method. I've created a fake filter and tried to apply this with no results at all. Nothing seems to happen. If I check the options of the update function the JSONFilters parameter remains empty&lt;SPAN&gt;. Am I doing something wrong? Any help would be greatly appreciated!&lt;/SPAN&gt;&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;export class Visual implements IVisual {
  constructor(options: VisualConstructorOptions) {

  let testFilter = new models.AdvancedFilter(
    {
      table: 'Tablename',
      column: 'columnName'
    },
    "And",
    {
      operator: "StartsWith",
      value: "x"
    }
  );

  this.host.applyJsonFilter(testFilter, "general", "Filter", FilterAction.merge);
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The aim is to obtain a value from a WMS or WFS service and use this value (normally a string) as a filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My test dashboard" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/566244iA47D8718EF8011DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="My test dashboard" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;My test dashboard&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Aug 2021 21:27:37 GMT</pubDate>
    <dc:creator>Roboman</dc:creator>
    <dc:date>2021-08-03T21:27:37Z</dc:date>
    <item>
      <title>Custom Visual: Applying Filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Applying-Filters/m-p/1996232#M30902</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a custom visual with an OpenLayers Map to better visualise spatial data. So far I've managed to filter and select data in other visuals and have the OpenLayers map react to the selection/filter (It zooms and highlights the selected data).&amp;nbsp;The next is to be able to select something on the openLayers map and filter the other visuals.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am however unable to apply a selection with the selectionmanager or a filter with the JSONFilter method. I've created a fake filter and tried to apply this with no results at all. Nothing seems to happen. If I check the options of the update function the JSONFilters parameter remains empty&lt;SPAN&gt;. Am I doing something wrong? Any help would be greatly appreciated!&lt;/SPAN&gt;&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;export class Visual implements IVisual {
  constructor(options: VisualConstructorOptions) {

  let testFilter = new models.AdvancedFilter(
    {
      table: 'Tablename',
      column: 'columnName'
    },
    "And",
    {
      operator: "StartsWith",
      value: "x"
    }
  );

  this.host.applyJsonFilter(testFilter, "general", "Filter", FilterAction.merge);
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The aim is to obtain a value from a WMS or WFS service and use this value (normally a string) as a filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="My test dashboard" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/566244iA47D8718EF8011DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="My test dashboard" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;My test dashboard&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 21:27:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Applying-Filters/m-p/1996232#M30902</guid>
      <dc:creator>Roboman</dc:creator>
      <dc:date>2021-08-03T21:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visual: Applying Filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Applying-Filters/m-p/2001186#M30941</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;HI&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/317800"&gt;@Roboman&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;How did you configure the selection interactions? Can you please share some more detail?&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_self"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In addition, you can also take a look at the following document about selection:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/selection-api" target="_blank"&gt;Power BI visual data point selections - Power BI | Microsoft Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 01:35:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-Applying-Filters/m-p/2001186#M30941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-06T01:35:53Z</dc:date>
    </item>
  </channel>
</rss>

