GDay all
I am trying to send an email with repeating sections all now going well although I need to use a5instance1,2 placeholder etc instead of [1],[2] etc placeholder ??? but that is not the question.
I am trying to conditionally send the repeating section based on the record existing (I am saving qualifications for contractors and some may have no qualifications whilst others may have 10 which are usually a PDF or Word document). Based on this, I am trying to use the ConditionStart & ConditionEnd in the HTML markup of the email. I am also nesting a ConditionStart & ConditionEnd inside the original ConditionStart & ConditionEnd.
Do I need to have a ConditionStart & ConditionEnd on each line ?
Is there a way I can suppress blank lines if there is no data or the Condition does not = true ?
Below is the code I have entered in the WYSIWYG of the Email HTML Editor and below that is what the email is sending through. Record 1 is totally filled out, Record 2 has a {cont_doc_type} of "Other" and Record 3 does not exist.
** CODE ENTERED**
{ConditionStart:other_filename_1:<%a5 isnotblank({cont_doc_type_a5instance1})%>}Document Type: {cont_doc_type_a5instance1}
{ConditionStart:other_filename_other_1:{cont_doc_type_a5instance1}="Other"} {cont_doc_type_other_a5instance1}{ConditionEnd:other_filename_other_1}
Filename: {cont_doc_filename_a5instance1}
Start Date: {cont_doc_start_date_a5instance1} Expiry Date: {cont_doc_end_date_a5instance1} Reminder Date: {cont_doc_reminder_date_a5instance1}{ConditionEnd:other_filename_1}
{ConditionStart:other_filename_2:<%a5 isnotblank({cont_doc_type_a5instance2})%>}Document Type: {cont_doc_type_a5instance2}
{ConditionStart:other_filename_other_2:{cont_doc_type_a5instance2}="Other"}{cont_doc_type_other_a5instance2}{ConditionEnd:other_filename_other_2}
Filename: {cont_doc_filename_a5instance2}
Start Date: {cont_doc_start_date_a5instance2} Expiry Date: {cont_doc_end_date_a5instance2} Reminder Date: {cont_doc_reminder_date_a5instance2}{ConditionEnd:other_filename_2}
{ConditionStart:other_filename_3:<%a5 isnotblank({cont_doc_type_a5instance3})%>}Document Type: {cont_doc_type_a5instance3}
{ConditionStart:other_filename_other_3:{cont_doc_type_a5instance3}="Other"} {cont_doc_type_other_a5instance3}{ConditionEnd:other_filename_other_3}
Filename: {cont_doc_filename_a5instance3}
Start Date: {cont_doc_start_date_a5instance3} Expiry Date: {cont_doc_end_date_a5instance3} Reminder Date: {cont_doc_reminder_date_a5instance3}{ConditionEnd:other_filename_3}
** EMAIL DATA RECEIVED **
Document Public Liability
Filename: Contractor Documents - IMG_5612.JPG
Start Date: 22/10/2014 Expiry Date: 28/10/2014 Reminder Date: 28/10/2014
Test Inputs
Filename: Y:\CCS\files\contractor\IMG_5487.JPG
Start Date: 08/10/2014 Expiry Date: 23/10/2014 Reminder Date: 23/10/2014
Filename:
Start Date: Expiry Date: Reminder Date:
Any advise would help and I hope this makes sense.
Cheers
Paul
I am trying to send an email with repeating sections all now going well although I need to use a5instance1,2 placeholder etc instead of [1],[2] etc placeholder ??? but that is not the question.
I am trying to conditionally send the repeating section based on the record existing (I am saving qualifications for contractors and some may have no qualifications whilst others may have 10 which are usually a PDF or Word document). Based on this, I am trying to use the ConditionStart & ConditionEnd in the HTML markup of the email. I am also nesting a ConditionStart & ConditionEnd inside the original ConditionStart & ConditionEnd.
Do I need to have a ConditionStart & ConditionEnd on each line ?
Is there a way I can suppress blank lines if there is no data or the Condition does not = true ?
Below is the code I have entered in the WYSIWYG of the Email HTML Editor and below that is what the email is sending through. Record 1 is totally filled out, Record 2 has a {cont_doc_type} of "Other" and Record 3 does not exist.
** CODE ENTERED**
{ConditionStart:other_filename_1:<%a5 isnotblank({cont_doc_type_a5instance1})%>}Document Type: {cont_doc_type_a5instance1}
{ConditionStart:other_filename_other_1:{cont_doc_type_a5instance1}="Other"} {cont_doc_type_other_a5instance1}{ConditionEnd:other_filename_other_1}
Filename: {cont_doc_filename_a5instance1}
Start Date: {cont_doc_start_date_a5instance1} Expiry Date: {cont_doc_end_date_a5instance1} Reminder Date: {cont_doc_reminder_date_a5instance1}{ConditionEnd:other_filename_1}
{ConditionStart:other_filename_2:<%a5 isnotblank({cont_doc_type_a5instance2})%>}Document Type: {cont_doc_type_a5instance2}
{ConditionStart:other_filename_other_2:{cont_doc_type_a5instance2}="Other"}{cont_doc_type_other_a5instance2}{ConditionEnd:other_filename_other_2}
Filename: {cont_doc_filename_a5instance2}
Start Date: {cont_doc_start_date_a5instance2} Expiry Date: {cont_doc_end_date_a5instance2} Reminder Date: {cont_doc_reminder_date_a5instance2}{ConditionEnd:other_filename_2}
{ConditionStart:other_filename_3:<%a5 isnotblank({cont_doc_type_a5instance3})%>}Document Type: {cont_doc_type_a5instance3}
{ConditionStart:other_filename_other_3:{cont_doc_type_a5instance3}="Other"} {cont_doc_type_other_a5instance3}{ConditionEnd:other_filename_other_3}
Filename: {cont_doc_filename_a5instance3}
Start Date: {cont_doc_start_date_a5instance3} Expiry Date: {cont_doc_end_date_a5instance3} Reminder Date: {cont_doc_reminder_date_a5instance3}{ConditionEnd:other_filename_3}
** EMAIL DATA RECEIVED **
Document Public Liability
Filename: Contractor Documents - IMG_5612.JPG
Start Date: 22/10/2014 Expiry Date: 28/10/2014 Reminder Date: 28/10/2014
Test Inputs
Filename: Y:\CCS\files\contractor\IMG_5487.JPG
Start Date: 08/10/2014 Expiry Date: 23/10/2014 Reminder Date: 23/10/2014
Filename:
Start Date: Expiry Date: Reminder Date:
Any advise would help and I hope this makes sense.
Cheers
Paul
Comment