<?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 Access Properties with empty DataView in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243401#M33502</link>
    <description>&lt;P&gt;I am reposting this question here as I think I posted on an incorrect forum - apologies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a custom visual that on some occasions does not need any input data from the Fields and hence the DataView is empty. Using the following in capabilities.json:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"supportsEmptyDataView"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This works fine.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problems arises with the property settings in the update function. I have a popup dialog that allows a user to set a hidden property and then stores the result in the&amp;nbsp; visual class with:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.visualHost.persistProperties(objects);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I access the properties in update() with;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.visualSettings = VisualSettings.parse&amp;lt;VisualSettings&amp;gt;(dataView);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This again works fine if there is data in the DataView. However, with no data, only the default values are returned. I also notice that if I manually set a property as a user, the missing property then becomes available in the update method - so the data are actually there but not processed unless a data field is added or a property updated.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I imagine that there is a call made somewhere the does this in the background i.e forces the properties to be enumerated. Is it possible to fire this programatically so that I don't have to force the user to add a dummy data field - or is there some other way of making the property available?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 16 Dec 2021 23:19:37 GMT</pubDate>
    <dc:creator>cmholden</dc:creator>
    <dc:date>2021-12-16T23:19:37Z</dc:date>
    <item>
      <title>Access Properties with empty DataView</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243401#M33502</link>
      <description>&lt;P&gt;I am reposting this question here as I think I posted on an incorrect forum - apologies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a custom visual that on some occasions does not need any input data from the Fields and hence the DataView is empty. Using the following in capabilities.json:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"supportsEmptyDataView"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This works fine.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problems arises with the property settings in the update function. I have a popup dialog that allows a user to set a hidden property and then stores the result in the&amp;nbsp; visual class with:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.visualHost.persistProperties(objects);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When I access the properties in update() with;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.visualSettings = VisualSettings.parse&amp;lt;VisualSettings&amp;gt;(dataView);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This again works fine if there is data in the DataView. However, with no data, only the default values are returned. I also notice that if I manually set a property as a user, the missing property then becomes available in the update method - so the data are actually there but not processed unless a data field is added or a property updated.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I imagine that there is a call made somewhere the does this in the background i.e forces the properties to be enumerated. Is it possible to fire this programatically so that I don't have to force the user to add a dummy data field - or is there some other way of making the property available?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Dec 2021 23:19:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243401#M33502</guid>
      <dc:creator>cmholden</dc:creator>
      <dc:date>2021-12-16T23:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Access Properties with empty DataView</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243567#M33504</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346253" data-lia-user-login="cmholden" class="lia-mention lia-mention-user"&gt;cmholden&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This is &lt;A href="https://community.powerbi.com/t5/Developer/persistProperties-with-empty-dataview/m-p/1862518/thread-id/29578/highlight/true" target="_self"&gt;currently a known issue with persistProperties&lt;/A&gt; and as per that thread it's something the team are aware of, but there's currently no ETA for a fix (I need this fix for one of my visuals too).&lt;/P&gt;
&lt;P&gt;There's also an issue in the &lt;A href="https://github.com/microsoft/PowerBI-visuals-tools/issues/396" target="_self"&gt;powerbi-visuals-tools repository here for it&lt;/A&gt;, which may be updated as and when things move along.&lt;/P&gt;
&lt;P&gt;If you need an update or direct comment from the tean, your best bet is to email them at&amp;nbsp;&lt;A href="mailto:pbicvsupport@microsoft.com." target="_blank" rel="noopener"&gt;pbicvsupport@microsoft.com&lt;/A&gt;, as they don't frequent these forums.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 02:12:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243567#M33504</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2021-12-17T02:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Access Properties with empty DataView</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243603#M33505</link>
      <description>&lt;P&gt;Thanks for the response Daniel.&lt;/P&gt;&lt;P&gt;I guess that we have to live with this until there is a fix.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Dec 2021 02:44:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Access-Properties-with-empty-DataView/m-p/2243603#M33505</guid>
      <dc:creator>cmholden</dc:creator>
      <dc:date>2021-12-17T02:44:20Z</dc:date>
    </item>
  </channel>
</rss>

