Thursday, November 14, 2024

APEX tip of the day: translate tooltip when TITLE = "some text" is added to the link attributes of a IR report column

The "link attributes" of an interactive report allows a developer to specify additional attributes for a column displayed as a link in a interactive report.

A tooltip that will be displayed when a user hovers over the link text with the pointer can be specified using the attribute TITLE, for instance: TITLE="open page xyz".

This column attribute however is not picked up by the translation process of APEX, so it's not something that can be be found in the translation repository.

An easy way to work around the problem if you need to translate the text is as follows:

  1. add a new column to the IR report containing:
    APEX_LANG.MESSAGE('MSGOPENXYZ') as MSG1
  2. Make the column hidden.
  3. Update the LINK ATTRIBUTES column attribute adding TITLE="#MSG1#"
  4. Add the message MSGOPENXYZ to the message repository for the main language and for the additional languages.
  5. Repeat the steps 1-4 if you have more links needing this.
  6. Seed you application
  7. Publish the application in the additional languages
  8. Enjoy the translated tooltip.

 



Tuesday, November 12, 2024

End loop statement can raise ORA-06502 too

I was puzzled when I got an error message allegedly occurring at a line containing an "end loop" statement and it took me a while to figure out that this occurs when either bound of the loop is NULL.

In my case both the initial and final bounds are variables and they were supposed to be not null or so I thought...

Here is a code snippet reproducing the error:

begin
  for i in null..100
  loop
    null;
  end loop;
end;
Error report -
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 5
06502. 00000 -  "PL/SQL: numeric or value error%s"
*Cause:    An arithmetic, numeric, string, conversion, or constraint error
           occurred. For example, this error occurs if an attempt is made to
           assign the value NULL to a variable declared NOT NULL, or if an
           attempt is made to assign an integer larger than 99 to a variable
           declared NUMBER(2).
*Action:   Change the data, how it is manipulated, or how it is declared so
           that values do not violate constraints.

So, if you see this error reported at this unusual location, you know what you are up against.

Wednesday, October 16, 2024

Two ways of configuring APEX faceted reports with cascading LOVs (video) #JoelKallmanDay

There are at least two ways of configuring facets in a faceted report in a hierarchical fashion, using different attributes for the child facet, one is straightforward, the other one more convoluted, let's find out in this video I prepared for the #JoelKallmanDay to remember a mentor and friend.

 


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