cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pbi_embedder1 Frequent Visitor
Frequent Visitor

Power BI Embedding - determine if report content has changed when in edit mode

Hello,

 

My organization is piloting Power BI embedded for our self-service reporting.  Does anyone know if there is a way to determine programmatically if the contents of a Power BI embedded report has changed while in edit mode?  I want to display a warning message back to the user similar to what happens when you edit a report in the PBI Service and navigate away without saving.

 

Thanks.

 

2 REPLIES 2
Highlighted
zoloturu
Advisor

Re: Power BI Embedding - determine if report content has changed when in edit mode

Hi @pbi_embedder1,

 

I think you need to add listeners. 

 

1) Go to Microsoft example application - https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#

2) Scroll down to Sample Report

3) Press button Select

4) Activate radio button Edit Mode

5) Press button Run

6) Go to tab Interact

7) You will see available methods and properties for embedding. Go to Edit & Save and expand it

8) Go to SaveAs triggered event. And on the right side you will see a code related to this option.

 

You can search through this menu to see other options.

 

Regards,

Ruslan

 

 

 

pbi_embedder1 Frequent Visitor
Frequent Visitor

Re: Power BI Embedding - determine if report content has changed when in edit mode

Hi zoloturu,

 

Thanks for the reply.  I've already added a listener to the SaveAs event and it works fine when a user selects the Save As button.  My issue/question is more related to the UX.  If the user makes edits to an embedded report and forgets to click Save or Save As before leaving the site or clicking on another report, I would like a modal dialog pop up to remind them to save the report.  Ideally I would like a "OnDirty" event or "Dirty" property of the report object so that I can tell a report has changed and to perform the appropriate action.   I'm not sure if it's possibe right now but wanted to see if anyone knew of a way.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 104 members 1,726 guests