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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
LukasSchlechter
Frequent Visitor

Visuals

Update methode isnt loading when im updating my visual.

 

I am trying to Create my own Visuals and im a bit new to the whole Power-bi/ Visual things.

I already set up a test-Dataset and a test Visual but im stuck to the point where all i do in the Update Methode isn´t working (the Dubugging is Hell on earth). I´ve tried to figure out where the update methode is called but without any success. in conclusion my update methode isnt called in any way...

Thx for the Help!

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @LukasSchlechter,

Your visual's update() method is called when you have supplied the necessary conditions to satisfy your dataViewMapping; the exception being unless you are using supportsEmptyDataView in conjunction with supportsLandingPage to have no data binding. In this case, the update method will fire as soon as the visual is instantiated, and thereafter for the scenarios outlined in the diagram here, as expected.

If you've ruled out the data binding potentially being incorrect, the next thing I'd look at is seeing if any errors are being suppressed by the developer visual.

An easy way to investigate is to use a try/catch block to identify the error to see if anything's being suppressed, and possibly to step through using the debugger statement in your code before any suspect lines (or even right as the update method is triggered, just to confirm it. I often also use console.debug() in code I'm trying out to ensure that the right methods are being hit, without interruptng my workflow too much.

If you're sure that the above starting points are not applicable to you, then ideally you'll need to share your code with us (preferably as a repository, so we can verify the combination of packages, capabilities and code to see if there's anything else that stands out.

Regards,

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


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 @LukasSchlechter,

Your visual's update() method is called when you have supplied the necessary conditions to satisfy your dataViewMapping; the exception being unless you are using supportsEmptyDataView in conjunction with supportsLandingPage to have no data binding. In this case, the update method will fire as soon as the visual is instantiated, and thereafter for the scenarios outlined in the diagram here, as expected.

If you've ruled out the data binding potentially being incorrect, the next thing I'd look at is seeing if any errors are being suppressed by the developer visual.

An easy way to investigate is to use a try/catch block to identify the error to see if anything's being suppressed, and possibly to step through using the debugger statement in your code before any suspect lines (or even right as the update method is triggered, just to confirm it. I often also use console.debug() in code I'm trying out to ensure that the right methods are being hit, without interruptng my workflow too much.

If you're sure that the above starting points are not applicable to you, then ideally you'll need to share your code with us (preferably as a repository, so we can verify the combination of packages, capabilities and code to see if there's anything else that stands out.

Regards,

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


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




i had issues with the dataViewMapping and now its working. The Exception handling was kinda helping but its not that ez to read if you just coded c#, python and java applications with good compiling programms.

Thank you for your Help!
Kind regards ,

Lukas

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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