Home Analytics Designing reports
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Calling a JavaScript function in data binding of chart

Hello forum members,

in a report design that contains tables and pie charts I am trying to display values based on predefined different time frames e.g. YTD. Therefore I am using a Javascript function in a .js file that is in the resources of the report design.

The calculations work fine in the tables. However, when I call the function in the data binding of the chart the message "...is not defined" pops up. I was performing the same steps as I was for the tables. Is it not possible to access global functions in a chart?

I am using the commercial version of the OpenText Magellan Analytics Designer Release 16.7

Thanks in advance

Comments

  • edited May 11
    I created a simple example.  The external js call worked (see attached).  The JavaScript function is called in the "Amount" binding.  Does this example work for you?  Can you share your report that is failing?
    Jeff F.
    Customer Support Engineer I
    OpenText
  • Hi Jeff,

    thanks for you quick reply which demonstrates the topic very well. I have opened your files in the Analytics Designer and after double-clicking on the chart I receive the same message "f1 is not defined". This happens even though the .js file is added to the resources section and in the right folder. A screenshot is attached,

  • Thank you for posting the screenshot.  I was able to replicate the issue.  Despite the message, the report runs without error and the external JavaScript function is correctly applied in my testing.  Is that the case for you as well?
    Jeff F.
    Customer Support Engineer I
    OpenText
  • Indeed, the report works with the function applied. I will see whether I can get my report to work by neglecting the error message and will let you know here in this post.

    Thanks

  • Are you able to open a support ticket?  This issue warrants filing a bug even if the resolution only involves fixing the error message.
    Jeff F.
    Customer Support Engineer I
    OpenText
  • Yes I am able to open a support ticket. Unfortunately I was not able to call a function in the report I am working with. The chart was not showing any data after the implementation. I am not able to upload the report and all files here because it contains sensitive customer data therefore I will open a support ticket.
    Thanks
Sign In or Register to comment.