This content has been marked as final. Show 6 replies
user8612301 wrote:use the famous logical statement
I am using Apex Send Email Process.
I have a page where i have check box conditions. ONLY WHEN check box checked as 'Yes', I need to display that field into Email.
field 1-Birthday Card Order YES NO
field 2-Wedding Card Order YES NO
If 1- is checked YES and 2- is checked as NO then I need to insert only
LABEL NAME FOR field 1. like,...
*1-Birthday Card Order*.How? Please advise.
Edited by: user8612301 on Mar 7, 2013 1:47 PM
Thanks for the reply.
I am thinking of creating a 'Display Only' item type like 'P1_LABEL'
---Source=SQL expression(select LABEL from apex_application_page_items
where application_id =110
and page_id = 18
AND ITEM_NAME = 'P1_Check_Box_Item')
---condition where P1_Check_Box_Item='YES'.
Then when i put this label pasted inside the Email portion like '&P1_LABEL.'So this label value is printed inside the Email only when the Check Box Item Value is YES.
-Am I right in this approach..THanks for your help
Some code to get you going, with relevant uses of [url http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm#BEIFGFJF]substitution syntax which means you could write this into a loop to check multiple checkboxes with similar names.
DECLARE l_label VARCHAR2(200); BEGIN IF v('P1_LABEL') = 'Y' THEN SELECT label INTO l_label FROM apex_application_page_items WHERE application_id = :APP_ID AND page_id = :APP_PAGE_ID WHERE item_name = 'P1_LABEL'; l_html_body := l_label||' extra email text...'; END IF;