Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
cmholden
Regular Visitor

Access Properties with empty DataView

I am reposting this question here as I think I posted on an incorrect forum - apologies.

 

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:

 
"supportsEmptyDataView"true,
 
This works fine. 
 
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  visual class with:
 
this.visualHost.persistProperties(objects);
 
When I access the properties in update() with; 
 
this.visualSettings = VisualSettings.parse<VisualSettings>(dataView);
 
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. 
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?
1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @cmholden,

This is currently a known issue with persistProperties 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).

There's also an issue in the powerbi-visuals-tools repository here for it, which may be updated as and when things move along.

If you need an update or direct comment from the tean, your best bet is to email them at pbicvsupport@microsoft.com, as they don't frequent these forums.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

2 REPLIES 2
dm-p
Super User
Super User

Hi @cmholden,

This is currently a known issue with persistProperties 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).

There's also an issue in the powerbi-visuals-tools repository here for it, which may be updated as and when things move along.

If you need an update or direct comment from the tean, your best bet is to email them at pbicvsupport@microsoft.com, as they don't frequent these forums.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Thanks for the response Daniel.

I guess that we have to live with this until there is a fix.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.