APEX shortcut variables

APEX shortcut variables are best in dynamic use in Javascript code. We can fetch data from database or can use any hard coded text.
Preview

Under the shared components we have pretty awesome feature of APEX shortcut. Preview

We have several source type available to populate the shortcut variables. * PL/SQl Function body
* HTML Text
* HTML Text with Escaped Special Chars
* Images
* Text with JavaScript Escaped Special Chars
* Message
* Message with JavaScript Escaped Single Quotes

Preview

PL/SQL function can be followed by:

Create or replace  function get_date
return date
as
begin
return sysdate;
end get_date;

Two types of common shortcuts can be like below.

1). HTML

Preview

2). PL/SQL

Preview

Scope declaration

var plsql_msg = '"PLSQL_MSG"';
var html_msg = '"HTML_MSG"';

Preview

These variables can be used in JavaScript for multiple purposes.

alert(html_msg);
alert(plsql_msg); 

Preview


comments powered by Disqus