Access to a report's content (Code-mode)

Vefa Gulecyuz shared this question 17 days ago
Answered

Hi guys, I would like to access to the data of a report via JavaScript.

I have a report (ss1). I can see its properties in the HTML section. (ss2) I want to be able to access the data of this report in the JavaScript (with Queryselector?) part to further process the data.

How can I do that?

Regards

Comments (6)

photo
1

Hi Vefa,

Thanks for reaching out. You can get report data from our internal JS API instead. Unfortunately though, the documentation for the JS API as it relates specifically to code mode is not yet published, allthough it should be coming soon. The JS API has been entirely re-written (the pre-existing JS API documentation in our Wiki relates to integration, not code mode, in case you come across it).

I believe one of our consultants has a recent JS API example that he may be able to pass on, so let me see what he comes back with to see if I can provide any further details regarding this. I should probably also note that while he hasn't tested querySelector() specifically, everything else he mentioned everything he's tried has worked in Code Mode thus far, so it may be worth double-checking the syntax and also checking the logs to see if any errors are being generated there. If so, if you could provide that log output that should be helpful as well.


Thanks,

Mike

photo
1

Hi Mike, if you can share the new JS API documentation, that would be great!

I have not seen obvious errors while my trials but there might be issues in the logs. I uploaded my logs to YF ftp server. File name is logs_vefa_11-03-2020.

photo
1

Hi Vefa,

I can definitely let you know once that's available - that may be a few weeks away, however.

In terms of the logs, there's a decent amount of activity in them. It would be helpful if you can re-attempt the JS query you're trying to run, take note of the timestamp that occurred, then subsequently provide an updated copy of your logs along with corresponding timestamp so we can accurately correlate entries in the logs to the actual user actions.


Thanks,

Mike

photo
1

Hi Vefa,

Just wanted to check in and see how things are going with this.

Regards,

Mike

photo
1

Hi Mike thanks, I was able to reach a reports content using some tricks from Brett's documentation.

My problem is solved.

It would still be great if you can share JS API documentation once it is ready.

Thanks

photo
1

Hi Vefa,

That’s good to hear! The release of the documentation should coincide with the official release of version 9. I’ve gone ahead and made a note for myself to send you a link to this when this is ready, but since the issue this ticket was tracking is now resolved, I’ll go ahead and close out this ticket.

Please don’t hesitate to reach out with any other questions or concerns.

Regards,

Mike