March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Solved! Go to Solution.
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
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)
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
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
7 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
8 | |
3 | |
2 | |
2 | |
2 |