Thursday, February 14, 2008

Build and use an apex page alias substitution string

Always check out the original article at for latest comments, fixes and updates.

The seasoned developers certainly know that among the apex built-in substitution strings there isn't any returning a page alias, whereas there is indeed a very handy substitution string returning the application alias for instance.

Page aliases allow you treat apex pages in terms of symbolic names in contrast with less meaningful numeric page IDs and they also may give you an edge when it comes to page indexing by web search engines, thanks to their self-explanatory names and assuming you did use such self-explanatory name of course... :-D

What i'm going to briefly document here is a 20 second set up process that allows you to stuff a brand new APP_PAGE_ALIAS into the built-in collection of substitution strings.

  1. Create an application item called APP_PAGE_ALIAS and define it as restricted if you don't want that anybody messes around it.
  2. Create an application computation for APP_PAGE_ALIAS with computation frequency Before Header, computation type SQL Query, containing the following computation source (based on an apex dictionary view):
SELECT page_alias
FROM apex_application_pages
WHERE application_id = :APP_ID
AND page_id = :APP_PAGE_ID
The computation will run on each and every page automatically updating the value of the application item that you can freely use in the form &APP_PAGE_ALIAS. inside branching, URLs, text and so on.

I find this a nice example of what you can do with application-wide computations and the apex dictionary views in a minimal amount of time.

See more articles about Oracle Application Express or download tools and utilities.

1 comment:

Anonymous said...

Thanks! Glad I found this, Its the perfect solution :)

Very well written and simple too

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles