Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PlugIn: How do I use a JSON file in a PlugIn?

Jegor WielerNov 5 2022

Hello everyone,
is it possible to include a JSON file as data source in a PlugIn?
I am trying to learn how to develop a PlugIn. Now I want a JSON file to be used as data source in the Javascript section of the plugin
Unfortunately, it doesn't work because I can't figure out how to include the JSON file.
I have uploaded the Javascript, CSS and JSON file in the "PlugIn, file section" . The javascript section of the plugin should call the json file as described below.
In Page Designer, I need to upload the file as a static application file and access it in the javascript function (see below). But in the Javascript section of the PlugIn, the variable "data" is always empty, probably because it doesn't work like in the Page Designer.

d3.json("#APP_FILES#data.json", function(data){...};

But how do I include the JSON file or path for the Javascript section in a PlugIn?
If my question is unclear, I can provide my workspace to clarify my problem.
I would be very grateful for any advice!

Oracle Apex Version: 22.2
Best Regards
Jegor

This post has been answered by InoL on Nov 6 2022
Jump to Answer

Comments

Post Details

Added on Nov 5 2022
3 comments
121 views