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!

Cannot (properly) make use of format mask in number field

Alex81Dec 18 2023

Maybe this one's for @carsten-czarski-oracle ?!

We've recently upgraded our DB from 18.xx to 19.21 and from APEX 19.xx to 23.2

Now, we're kinda facing a “weird” problem (which we did not encounter until now). When using number fields, we often apply certain format masks and we're using those fields as part of e.g. filter criteria in some other where clauses on that very page.

I've created a very small test page to show the problem:

https://apex.oracle.com/pls/apex/r/cmdr_eater/test-app/number-format-mask-issue

Why is the whole format mark being “copied” from the field “Number with format mask” to “Output 1”? Isn't the mask just a display thing? It should NOT change the value itself; here it gets copied with the currency sign and all that stuff which then leads to various ORA-errors, depending on how and where it is used :-(

The field “Output 2” explicitely does a “to_number()” with the very same mask that was used in the page item definition of “Number with format mask”, which is: FML999G999G999G999G990D00

The only code on that page is a simple dynamic action for “Change” on the 1st field, executing the following (server side) PL/SQL:

:P2_OUTPUT_1 := :P2_NUMBER_FORMAT;
:P2_OUTPUT_2 := to_number(:P2_NUMBER_FORMAT, 'FML999G999G999G999G990D00');

Is this meant to be that way (by design) or might this even be some sort of bug?

Thanks for your help in advance & kind regards

Alex

This post has been answered by Carsten Czarski-Oracle on Jan 8 2024
Jump to Answer
Comments
Post Details
Added on Dec 18 2023
2 comments
2,324 views