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!

Send email to address based on select list value

Jason S-Uk-OracleSep 17 2012 — edited Sep 18 2012
Using apex 4.1.

I have crated a Page Process type PL/SQL, On Submit - After Computations and Validations which emails a user successfully.
I'd like to modify the Page Process to email a user based on the value in Select List P2_type. Apologies for the badly written code (newbie to apex and sql).


DECLARE
ls_EmailTo VARCHAR2(128);
BEGIN

IF :P2_TYPE = 'Hardware' THEN
ls_EmailTo := 'hardware@somewhere.com';
ELSE IF :P2_TYPE = 'Software' THEN
ls_EmailTo := 'software@somewhere.com';
END IF;

APEX_MAIL.SEND( p_to => ls_EmailTo,
p_from => 'some_user@user.com',
p_body =>
'Blurb here:'||:P2_TYPE,

p_subj => 'New Request for '||:P2_CUSTOMER||' On '||:P2_DATE);



Many thanks
Jason
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2012
Added on Sep 17 2012
6 comments
477 views