In oracle apex, i have two textflelds, one is for client id, and other is for client name.
I want that when I put the client id , client name's textfield should show the value automatically by fetching from the table.
i have tried it by using function, but failed
create or replace function clientname_byid(c_id in number)
return varchar2
is
cname varchar2(25);
begin
select client_name into cname from client_data where client_id = c_id;
return cname;
end;
and call this function in the clientname textfield by
select clientname_byid(:P2_CLIENT_ID) from dual;