Need a special offer?Find out if your project fits.
+

Is it possible to know what functionality is triggering report change event?

Answered
Subodh Singh Dongol asked on September 28, 2021

Hello,
I was hoping to know if there was a way to get the name of the call (mentioned here: https://www.flexmonster.com/api/reportchange/) that was triggering the report change event when user interacts with Flexmonster UI. I am trying to implement some logic based on adding and removal of calculated fields while doing nothing when other calls trigger the event. So, I was hoping to see if there was a way to distinguish which call is triggering the reportchange() event or may be in update() event.
On a side note, I came across this ticket where it is mentioned there was a plan to improve reportchange event to provide information on what was changed: https://www.flexmonster.com/question/detecting-report-change/ 
Is it possible to know what was being changed through reportchange event?
Thank you.  

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 30, 2021

Hello, Subodh,
 
Thank you for posting a question to our forum.
 
The `reportchange` itself does not provide information which call has triggered the event. At the same time, this can be detected with the help of getReport method. You just need to store the previous report version and check the differences after the reportchange event is triggered. You can see the example on the following JSFiddle: https://jsfiddle.net/flexmonster/nv0pe726/
 
Please let us know if you have any further questions.
 
Kind regards,
Nadia

Please login or Register to Submit Answer