Editable Help

I have now delivered a number of Apex applications into production and have to say that as much as I like the item help functionality in Apex, I have never actually taken the time to fill each item with anything particularly useful. The Apex team are as bad with their item help which usually re-words the the label text. A better solution would be to have the ability to edit the item help whilst the application is in production, thus allowing users to add their own help information when required. Forum question


This demo application has 2 users: a standard user and an admin users. The standard user is able to view the item help whereas the admin user can view and edit the help. This was achieved with the following steps:

1. Create an Optional label Template called 'Optional Label with Editable Help'.

<label for="#CURRENT_ITEM_NAME#"><a class="t13OptionalLabelwithHelp" href="javascript:popUp2('f?p=&APP_ID.:506:&SESSION.:::506:P506_ITEM_ID:#CURRENT_ITEM_NAME#',630,600)" tabindex="999">

2. Create an Required label Template called 'Required Label with Editable Help.

<label for="#CURRENT_ITEM_NAME#"><a class="t13RequiredLabelwithHelp" href="javascript:popUp2('f?p=&APP_ID.:506:&SESSION.:::506:P506_ITEM_ID:#CURRENT_ITEM_NAME#',630,600)" tabindex="999"><img src="#IMAGE_PREFIX#requiredicon_status2.gif" alt="" />

These label templates can be used for any item help that you wish to allow admin users to edit. If you want all item help to be editable then overwrite the existing templates with the above.

3. Create a Table in your target Schema to store the help information.


4. Create a help page in your application with a 'popup' template (e.g. 506).

5. Create an Insert/Update form Region based on the Help table. Set the help item to be of type HTML. Create an item :P506_EDlT Hidden and Protected and set the Form Region to conditionally display when item:P506_EDIT=' Y'.

6. Add another HTML region with an item of type Display Only to conditionally display when :P506_EDIT is null source of type SQL

SELECT help FROM help WHERE item =:P506_ITEM_ID

7. Add an edit button to the HTML region with a branch to change the :P506_EDit=' Y'.

8. Migration Script

(item_id, item_name, page_id, help)
item_id, item_name, page_id, item_help_text
WHERE application_id = 55349
AND item_label_template LIKE '%Editable%')


Andy said…
Nice one Shunt. Works a treat.

Any reason to use #CURRENT_ITEM_ID# instead of #CURRENT_ITEM_NAME#?