<?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 VisualSetings with Empty DataView in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualSetings-with-Empty-DataView/m-p/2242636#M4146</link>
    <description>&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;: &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 14:55:14 GMT</pubDate>
    <dc:creator>cmholden</dc:creator>
    <dc:date>2021-12-16T14:55:14Z</dc:date>
    <item>
      <title>VisualSetings with Empty DataView</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualSetings-with-Empty-DataView/m-p/2242636#M4146</link>
      <description>&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;: &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 14:55:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualSetings-with-Empty-DataView/m-p/2242636#M4146</guid>
      <dc:creator>cmholden</dc:creator>
      <dc:date>2021-12-16T14:55:14Z</dc:date>
    </item>
  </channel>
</rss>

