How do I further massage the data that comes behind the GET executed against the filename=URL?
Is there a FlexMonster callback function which I can customize to process the data that arrived through the GET call?
The webservice sitting behind the GET url provides data in a format that is not yet ready for FlexMonster. I need to execute some javascript code to customize the data AFTER it is retrieved by the GET and then pass it on to FlexMonster.
In detail, GET gives me a tree-like json, and I want to use json2csv to produce a flat csv structure out of that tree-like json.
Thank you in advance,
Serban
Hello, Serban,
Thank you for contacting us.
We suggest using the data
property instead of the filename
. It allows you to display data that is already on your page. So you can get the data on the page, modify it and then pass to Flexmonster. Here is an example of using the data
property: https://jsfiddle.net/flexmonster/pz431qp5/
Please inform me in case of questions.
Regards,
Tanya
Thank you. I knew about the data property. The problem is that the data property doesn't get saved in the FlexMonster json config file (json that gets produced by the SAVE option) as a method WITH custom parameters that describe my web service filters. The URL behind the filename saves the query string params at the end, and those describe my data specific to a report.
The whole idea is that I want to create a server side collection of JSON FLEXMonster config files that my users can customize even further however they please. These config files must preserve the data source (as in web service calls) so that I don't have to do it in parallel. So, I still want my URL with query string params to describe my data, I just want to proxy the return of the data, to massage a bit the data before FlexMonster processes it.
Hello Serban,
Thank you for your feedback.
Actually, Flexmonster does save the data
property to config. All the JSON data will be saved to the JSON report. You can try to save the config on the JSFiddle which my colleague Tanya provided above.
As for applying some custom logic before sending data to Flexmonster, we recommend considering Ajax
approach. With Ajax
, you can run some custom javascript before passing the data to Flexmonster. Here is a JSFiddle example: https://jsfiddle.net/flexmonster/2qb8wzh1/.
Please let us know if you need more guidance from us.
Regards,
Dmytro