Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to dynamically set the label

312291Sep 24 2004 — edited Sep 24 2004
Is it possible to dynamically set the label of an item based on a value in a database table?

For e.g., there is an item with a name P1_CATEGORY. In a lookup table, the label for P1_CATEGORY could be mapped as either "Category" or "Section" or "Type" depending upon different situations. So, at run time, can the label be dynamically displayed with one of those three values depending upon the situation? If so, how can this be done?

Thanx in advance.

Comments

Kwong-Oracle
You can specify in the label field "&P1_CATEGORY." (without the double quote, and note the '&' sign before the name and the '.' at the end, both have to be there in order for it to work).
312291
Ken:

How/where would you write the code to force the label to be populated dynamically? Could you please illustrate with an example?

Thanx in advance.
Kwong-Oracle
I just noticed that I misread your original question.
Now suppose you branch to P1 from several links on
P0, and each link determines whether the label for
P1_CATEGORY is "Category", "Section" or "Type".
The trick is to set up a parameter, for example, P1_CATEGORY_LABEL on P1. Then when you construct the
link from P0, you pass P1_CATEGORY_LABEL and set the
value on the link.
On P1, when you specify the label for item P1_CATEGORY,
you put in "&P1_CATEGORY_LABEL." in the "Label" field.
That should work.

If you are using link to go to P1, then you will probably
need to set P1_CATEGORY_LABEL value in a Before Header process in P1.
312291
Ken:

Thanx again - it worked!
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 22 2004
Added on Sep 24 2004
4 comments
348 views