I was asked a question the other day about substitution strings. Like many things, I did not know all of them off the top of my head. But I do know where to find them.
A trick I used to use was to create a page with an HTML Region and put all the substitution strings in there...just so I could remember them.
In an HTML Region, the syntax is
&<substitution_string>.Here's the list of all the substitution strings supplied by APEX in 3.2.1.00.11 (just cut and paste this into your Region Source):
<b>APP_ALIAS</b>: &APP_ALIAS.<br>And here's what it looks like when you run the page:
<b>APP_ID</b>: &APP_ID.<br>
<b>APP_IMAGES</b>: &APP_IMAGES.<br>
<b>APP_PAGE_ID</b>: &APP_PAGE_ID.<br>
<b>APP_SESSION</b>: &APP_SESSION.<br>
<b>APP_UNIQUE_PAGE_ID</b>: &APP_UNIQUE_PAGE_ID.<br>
<b>APP_USER</b>: &APP_USER.<br>
<b>AUTHENTICATED_URL_PREFIX</b>: &AUTHENTICATED_URL_PREFIX.<br>
<b>BROWSER_LANGUAGE</b>: &BROWSER_LANGUAGE.<br>
<b>CURRENT_PARENT_TAB_TEXT</b>: &CURRENT_PARENT_TAB_TEXT.<br>
<b>DEBUG</b>: &DEBUG.<br>
<b>HOME_LINK</b>: &HOME_LINK.<br>
<b>LOGIN_URL</b>: &LOGIN_URL.<br>
<b>IMAGE_PREFIX</b>: &IMAGE_PREFIX.<br>
<b>SCHEMA OWNER</b>: &SCHEMA_OWNER.<br>
<b>PRINTER_FRIENDLY</b>: &PRINTER_FRIENDLY.<br>
<b>LOGOUT_URL</b>: &LOGOUT_URL.<br>
<b>PROXY_SERVER</b>: &PROXY_SERVER.<br>
<b>PUBLIC_URL_PREFIX</b>: &PUBLIC_URL_PREFIX. <br>
<b>REQUEST</b>: &REQUEST.<br>
<b>SQLERRM</b>: &SQLERRM.<br>
<b>SYSDATE_YYYYMMDD</b>: &SYSDATE_YYYYMMDD.<br>
<b>WORKSPACE_IMAGES</b>: &WORKSPACE_IMAGES.<br>
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnu1kwZJp21R2PcKe2UP626hxvfKbRoI6HXNcIit9TLYD9WL-7BDk63NQCCYbZpjClLzaZZypve8zAp_Bq2SLTed06PnbPsgOoSwF867XwSDe0i5aE_pYrj_XUIVZSDr7F2UM43-oSdkxB/s800/substitution_strings.png)
You can also create your own custom substitution strings. First, go to your application home and then click on the link shown below:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIPUL65MG6XnkEIL6R0virQdeWCeoodXODSJHq7VneiOO52eaHtU3dU47cIM1x8u62zrjf2QwI4ouyWZTXlwERPxS3kVB7tZHUfsPowx14HSH6S8Fj_n7LTSBa5EkKZgErynNDvRp7UhRI/s800/01_application_home.png)
So you don't have to see the entire page, just click on the "Substitution" filter:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS1Omd8O0idypjshx703cMfFxTwASL0Ckn0a6BDL8kW8O0UNn6XuBxV29QgrekqbbOo1mvEpf8vuCcx_F1JLTeYRHH2-6BrQL9dBh0M7dtY9RE7zU6utMHY8RCLyT7d7kkw6xNTt7a-RTD/s400/02_edit_application_definition.png)
Then add your own, it's a key/value pairing similar to static LOVs
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg88L97O1nTfDB6aiherlHxx8BBMHmKObmu6oSpDkbPyJcOeIqFtkwPzeCJ8HO2FGbPeElDwLxrn6PVqaGCoyd26ATje49cegh_QSJRNqlgHrVl1zXFMRSfCJGESAYSnuDYyvGbLF3rnFK/s400/03_sub_strings.png)
Add that to your Region Source, run the page and voila!
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3mgN4uShm8xFTHnXned1fW9g_R01tqlOg2lfSjoSWMPX3AArcE03uswzK5oxb_aOF_a-GW7Jy6L2IkSytT8T_9np2JDpDsHxwIfXmnVrbreRhXFOTnIzNDHCVSgkSMuHCySYKtpHHHfcz/s800/04_custom_sub_string.png)
4 comments:
You can do the same with application items.
Good point sir!
Might as well add Page Items as well.
Is there anyway to SET a substitution string in an anonymous PL/SQL block?
@Sue
Assume your substitution string is MY_SUBS.
You can use it in an anonymous PL/SQL block as :MY_SUBS
Post a Comment