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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pbi_embedder1
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
zoloturu
Memorable Member
Memorable Member

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

😎 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

 

 

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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