We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Check to see if the fields have been loaded

Answered
Younus M asked on January 18, 2022

Hi, 
I'm looking to track some data as the flexmonster screen loads. After the user has selected fields for the report and then after the query has run. Now, I went through the events and they actually run after what I need, but they also run when the "fields" modal is open. Such as the "querycomplete" event. But there's no clear way for me to make the distinction that the report has been loaded. A hack is simply ignoring the first fire of that event, but i don't think thats a good solution. So I was wondering if there was any that specifically runs after the Fields list has beens closed and the report has been loaded. I tried every event in the docs that seemed like it would make sense, any "...loaded" "...complete" events, and they all fired twice: once on field list open, and then second on the report completing
 
Thanks!

4 answers

Public
Younus M January 18, 2022

To give some more context, I'm using a custom api not just loading data directly into the flexmonster component. Using custom data sources/indexes that connects to a flexmonster api

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster January 19, 2022

Hello, Younus,
 
Thank you for reaching out to us.
 
For your case, it is important not only to sign on necessary event but also to sign off the event to prevent additional calls.
Kindly check the following example on JSFiddle illustrating the suggested approach: https://jsfiddle.net/flexmonster/jgd62vnb/.

Please let us know if it works for you. Feel free to contact us if other questions arise.
 
Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster January 26, 2022

Hello, Younus,
 
Hope you are doing well.
 
We were wondering if you had some time to test the suggested approach.
 
Looking forward to hearing your feedback.
 
Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster February 3, 2022

Hello, Younus,
 
Hope you are doing well.
 
Just checking in to ask if the suggested approach helped you. 
 
Looking forward to hearing from you.
 
Kind regards, 
Nadia

Please login or Register to Submit Answer