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!

Page Validation: Function Returning Boolean

MontherzMay 12 2012 — edited May 12 2012
Hi guys,

I'm trying to make a simple page validation to check an item in my tabular form if it is a number or not:

BEGIN
FOR i IN 1 .. apex_application.g_f12.COUNT
LOOP
IF LENGTH(TRIM(TRANSLATE(apex_application.g_f12(i), '0123456789',' ')))is NOT null
THEN
RETURN FALSE;
END IF;
END LOOP;
END;

but i keep getting this error if g_f12= AAA :

ORA-06502: PL/SQL: numeric or value error: character to number conversion error
Error ERR-1021 Unable to run "function body returning boolean" validation.
OK

if g_f12 = A12 or any mixed alphanumeric it will work!!!

*( i've tried this with function returning text and it works like a charm but in this case i have to use function returning boolean to enable me to translate the error message)*

am i doing somthing wrong please help

Thank You
This post has been answered by jariola on May 12 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2012
Added on May 12 2012
3 comments
481 views