Thursday, March 27, 2008

Creating Help in APEX

It's not a new feature of APEX 3.1, but I didn't use/see it that much before. With the new icons in APEX 3.1 the Help region draw my attention.

Did you already see the region type called "Help Text"?


If you don't like to write documentation, this feature is something you should look at. Of course we all start with writing our test cases and documentation about how the system will work before we actually develop, so not sure who will use this ;-)

Seriously, some of us do put some help text with the items, so if you click on the label of the item you get some help. Wouldn't it be nice in that case if you could also see the help of all items at once?

That's exactly what this new feature is doing! The Help Text Region gets filled with all Help Text of the items on that page.

An example will make it more clear...

1) Create a new Blank Page with as template "PopUp". On that page create a new region of type "Help Text". (see the above screenshot to select the region)
Give it an alias of HELP_PAGE (in Page Attributes)


2) On another page, create two new items: for ex. two text-items: name and address and add some text in the Help section. Also add some text for the Help in the Page Attributes
3) Last step to do: add a url to the Help page on every page
Go to page 0 (create Page 0 when you don't have it) and add a region (display before footer) with a link to f?p=&APP_ID.:HELP_PAGE:&SESSION.:&APP_PAGE_ID.
Also put a condition on the Help Region as we don't want to see the help on the help page itself.
("Current Page is NOT in Expression 1")


4) Run your page and click on the Help link
You should see the help of both items!

Nice, isn't it?


An export (APEX 3.1) of an application which shows this feature in action, can be downloaded here.

10 comments:

Unknown said...

Pretty neat. It only took me 1 min.
Thanks Dimitri.

-abe

stickray said...

Dimitris can you please help me on this?I am creating a real time road enquiry system with oracle XE,can you please teach me how to create a report for a example a report to show start date,end date,roadname,utiliies,streetname on a form?i have tried all the tutorials but my report doesnt seem to show up,i need help.thanks
Ebenezer.

Dimitri Gielis said...

Hello Ebenezer,

I would need to see your report to better understand what you want. Are you having problems with the SQL?

The best and fastest way to get (free) help is through the APEX forum: http://forums.oracle.com/forums/forum.jspa?forumID=137

If you want me to login to your system and give you some guidance, feel free to drop me a mail.

Thanks,
Dimitri

Skip S said...

Dimitri,
Thanks for posting this. It helped me get help running in minutes.

But I didn't catch this part: Also put a condition on the Help Region as we don't want to see the help on the help page itself.
("Current Page is NOT in Expression 1")

The link to help on Page Zero shows up on the Help page and on the Logon page. I'd like to suppress that. Is there a way to prevent the page zero from these two pages or set conditions on these pages to keep the region in Page Zero from displaying before the footer?

Thanks.
Skip

Dimitri Gielis said...

In your condition of the region you specify the pages you don't want the help region to be on

Peter Clamp said...

Dimitri, Is there an easy way to display only the help that has been defined at the Page level, and to exclude the Region help? I'm finding that the Region help is excessively long and fragmented when there are lots of items on a page. Thanks,
Peter

Anonymous said...

Thanks, works fine! Only one thing that bothers me: (have spent a sleepless night over that) Is there any way to adjust the Layout of the Help Region? Here it shows a colon after a line break that drives me insane. Or do I have to build my own function that renders the help text?
Regards,
Niklas

Dimitri Gielis said...

Either you create your own procedure to render the HTML or you may want to try with css and javascript to make it a bit cleaner.

They just made the online APEX help responsive, so maybe APEX 5 includes a more responsive Help.

Anonymous said...

Hi Dimitri,

Is it possible to display the help of the page without items? I don't need help for each item. Can't find how to configure this.

Thanks,
Elena

Dimitri Gielis said...

Hi Elena,

If you create a report like this:

select help_text
from apex_application_pages
where application_id = :APP_ID
and page_id = :APP_PAGE_ID

you get the help for only that page.

Hope that helps,
Dimitri