Introduction: –
Enabling the “Copy to Clipboard” functionality in Oracle APEX Interactive Reports allows users to easily copy and share data directly from the report. This feature adds a layer of convenience for users who need to extract multiple data points without exporting to external files. It also streamlines workflows by allowing users to quickly transfer report data for further analysis or sharing. Implementing this functionality enhances the usability and interactivity of APEX applications. As more users demand seamless access to data, this feature becomes increasingly valuable.
The following technologies have been used how to Enable Copy to Clipboard Functionality in Oracle APEX.
- Javascript
- Oracle APEX
Why we need to do: –
In many scenarios, users need to quickly copy data from reports without the hassle of downloading or exporting files. By enabling “Copy to Clipboard,” data extraction becomes faster and more efficient, improving productivity. It eliminates the need for manual data entry and reduces the risk of errors. Furthermore, it allows for a smoother user experience when interacting with reports, especially for users who need to share data across platforms. This functionality meets modern expectations for ease of use and accessibility.
How do we solve:
The following steps will help to copy to clipboard using Oracle APEX,
Step 1: Create a interactive report
Step 2:Create a Virtual Column and place a html expression
<button type=”button”
title=”copy to clipboard”
aria-label=”copy to clipboard”
data-file-url=”#EMAIL#”
class=”cc-copy-btn t-Button t-Button–noLabel t-Button–icon t-Button–hot t-Button–success t-Button–noUI”>
<span aria-hidden=”true” class=”t-Icon fa fa-clone”></span>
</button>
Step 3: Add a Dynamic Action to execute the javascript code.
Code:
let copiedText = $(this.triggeringElement).data(‘EMAIL’);
navigator.clipboard.writeText(copiedText);
/*to show success message (Optional)*/
apex.message.showPageSuccess(‘URL Copied to Clipboard!’);
Conclusion:
The “Copy to Clipboard” functionality in Oracle APEX Interactive Reports improves user experience and enhances report interactivity. It allows for faster and more efficient data copying, which is particularly useful in daily workflows. By implementing this feature, developers create more streamlined applications that align with user expectations. It reduces unnecessary steps and manual processes, promoting productivity. Ultimately, this feature ensures that APEX reports remain functional, modern, and user-friendly in a fast-paced work environment.
On Clicking the Copy to Clipboard button.
The copied text is pasted into a page item.