Templates

mike

Member³
I use the templates A LOT. There are some times that I can't figure out how to get around some things.

For example, I would like this template to have 4 check boxes for files. Because there are commas, it changes the check boxes to a drop down list and everything gets messed up:

Code:
ZFND_UTIL.send_email(i_to            => v_email_addr
                    ,i_subject       => c_email_subj
                    ,i_mailhost      => 'mailhost.ohsu.edu'
                    ,i_body          => v_email_text
                    ,i_filename1     => v_outfile_name1 -- attachment
                    ,i_filename2     => v_outfile_name2 -- attachment
                    ,i_filename3     => v_outfile_name3 -- attachment
                    ,i_filename4     => v_outfile_name4 -- attachment
                    ,o_return_status => v_return_status
                    ,o_msg_count     => v_msg_count
                    );
IF v_return_status != 'S' THEN
   ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
   FOR cnt IN 1..v_msg_count
   LOOP
     ZFND_DEBUG.PUT_LINE(fnd_msg_pub.get(p_msg_index => cnt
                                        ,p_encoded   => 'F')
                                        );
   END LOOP;
   ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
   RAISE email_not_sent;
END IF;
Also, if there is a single quote in the option box, it doesn't include anything past it. It kind of ends the quote.

Anyway, the bottom line is that it would be nice if there is an escape character to ignore single quotes and commas and whatever else. I didn't see that there was a way in the user manual if there is a way.

Thanks for considering,

Mike
 
The template didn't come out correctly for some reason. I think I grabbed the wrong version.

Here it is again:

ZFND_UTIL.send_email(i_to => v_email_addr
,i_subject => c_email_subj
,i_mailhost => 'mailhost.ohsu.edu'
,i_body => v_email_text[Filename1?=/"
,i_filename1 => v_outfile_name1"][Filename2?=/"
,i_filename2 => v_outfile_name2"][Filename3?=/"
,i_filename3 => v_outfile_name3"][Filename4?=/"
,i_filename4 => v_outfile_name4"]
,o_return_status => v_return_status
,o_msg_count => v_msg_count
);
IF v_return_status != 'S' THEN
ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
FOR cnt IN 1..v_msg_count
LOOP
ZFND_DEBUG.PUT_LINE(fnd_msg_pub.get(p_msg_index => cnt
,p_encoded => 'F')
);
END LOOP;
ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
RAISE email_not_sent;
END IF;
 
Mike,

This looks like a bug, as the documentation says that you can include special characters in the text by enclosing in double quotes.

However, to get round it you can use text substitution variables like this :-

Code:
[$TEXT f1="
,i_filename1 => v_outfile_name1"]
[$TEXT f2="
,i_filename2 => v_outfile_name2"]
[$TEXT f3="
,i_filename3 => v_outfile_name3"]
[$TEXT f4="
,i_filename4 => v_outfile_name4"]
ZFND_UTIL.send_email(i_to => v_email_addr
,i_subject => c_email_subj
,i_mailhost => 'mailhost.ohsu.edu'
,i_body => v_email_text[Filename1?=/$f1][Filename2?=/$f2][Filename3?=/$f3][Filename4?=/$f4]
,o_return_status => v_return_status
,o_msg_count => v_msg_count
);
IF v_return_status != 'S' THEN
ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
FOR cnt IN 1..v_msg_count
LOOP
ZFND_DEBUG.PUT_LINE(fnd_msg_pub.get(p_msg_index => cnt
,p_encoded => 'F')
);
END LOOP;
ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
RAISE email_not_sent;
END IF;
Hope this helps ...

D.
 
D.

Yes - that works great. That method solved the single quote problem I had in another template also.

Thanks for your help!

Mike
 
Back
Top