Hi,
I am trying to call a Function on my database from a page in APEX. This is probably very basic but I've searched a lot and I cant find any documentation on it, so I'm hoping that one of you can help me out.
I have written a very basic example function, that accepts a varchar and returns a number.
So what I would like to do now is create a page region with a text field where the user can key input that is passed to the function, and then have a display only item that shows the output of the function in the same page region.
create or replace
package pack_function_test
is
function fn_test (ca_character in VARCHAR2)
return number;
end;
create or replace
package body pack_function_test
is
function fn_test (ca_character in VARCHAR2)
return number
is
vl_number number(1);
begin
IF ca_character = 'A'
then
vl_number := 1;
elsif ca_character = 'B'
then
vl_number := 2;
end if;
RETURN vl_number;
END;
end;
I've had some great help here in the past so I am looking forward to your responses.
Thanks!