If you are using a static value number of times in your Oracle Application Express (APEX) application that you have to change on all occurances if the value had changed. For example if you had a system with a url used all over pages and had changed you would have to go and change the variable defined in every page for it to take correct effect throughout application.
There is a way to define a global variable as long as you have a static value to go in it. Please find below how you define and use this global system variable in apex applications.
Note: Oracle Application Express or APEX v4.x is now released with lot of fixes and improvements.
There is a way to define a global variable as long as you have a static value to go in it. Please find below how you define and use this global system variable in apex applications.
- Login to application express as Administrator.
- Click Application Builder
- Select the application.
- Go to Shared Components
- Click Globalization Attributes under Globalization section
- Select Definition tab
- Select Subtitutions tab
- Here you can define Subtitution Strings with their corresponding values
- For example you can define string "MYEXTERNALURL" with value "http://www.mydomainname.com" and click Apply Changes.
- Once defined inside your page Region source definition within your SQL code you can use ":MYEXTERNALURL" rather than putting full domain name again and again.