<?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: First call to update method has empty dataView in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/First-call-to-update-method-has-empty-dataView/m-p/229076#M7221</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/36706"&gt;@callum&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is expected behavior. We face the same with all of custom visuals.&lt;/P&gt;&lt;P&gt;Our recommendation is to skip rendering if dataView is empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Microsoft/PowerBI-visuals-ChicletSlicer/blob/master/src/chicletSlicer.ts#L415" target="_blank"&gt;This&lt;/A&gt; is how we check dataView for Chiclet Slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2017 09:19:05 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2017-08-10T09:19:05Z</dc:date>
    <item>
      <title>First call to update method has empty dataView</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/First-call-to-update-method-has-empty-dataView/m-p/228290#M7193</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some reason, the very first call to my visual's update does not populate the options argument with any dataViews&amp;nbsp;(and thus no data), but on subsequent calls it does. The first call also seems to have a different "type"; 62 instead of 2, although what this means I have no idea (&lt;A href="http://microsoft.github.io/PowerBI-visuals-core/interfaces/powerbi.visualupdateoptions.html" target="_self"&gt;Even the API docs don't mention a "type" property!&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my update method I simply do a console.log(options), and this is what's produced after several updates (the top one is irrelevant):&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="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/53967iB6B9E3636AC36C90/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, there's something different about the first call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my capabilities.json, I think it's structured correctly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "dataRoles": [
    {
      "displayName": "Solution areas",
      "name": "solutionAreas",
      "kind": "Grouping"
    },
    {
      "displayName": "Pillars",
      "name": "pillars",
      "kind": "Grouping"
    },
    {
      "displayName": "Statuses",
      "name": "statuses",
      "kind": "Grouping"
    },
    {
      "displayName": "Names",
      "name": "names",
      "kind": "Grouping"
    }
  ],
  "dataViewMappings": [
    {
      "table": {
        "rows": {
          "select": [
            {
              "for": {
                "in": "solutionAreas"
              }
            },
            {
              "for": {
                "in": "pillars"
              }
            },
            {
              "for": {
                "in": "statuses"
              }
            },
            {
              "for": {
                "in": "names"
              }
            }
          ]
        }
      }
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;Any ideas what could be causing this? This is a brand new project so I haven't tinkered with anything really, just capabilities.json and the update method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 09:57:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/First-call-to-update-method-has-empty-dataView/m-p/228290#M7193</guid>
      <dc:creator>callum</dc:creator>
      <dc:date>2017-08-09T09:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: First call to update method has empty dataView</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/First-call-to-update-method-has-empty-dataView/m-p/229076#M7221</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/36706"&gt;@callum&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is expected behavior. We face the same with all of custom visuals.&lt;/P&gt;&lt;P&gt;Our recommendation is to skip rendering if dataView is empty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Microsoft/PowerBI-visuals-ChicletSlicer/blob/master/src/chicletSlicer.ts#L415" target="_blank"&gt;This&lt;/A&gt; is how we check dataView for Chiclet Slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 09:19:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/First-call-to-update-method-has-empty-dataView/m-p/229076#M7221</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-08-10T09:19:05Z</dc:date>
    </item>
  </channel>
</rss>

