cancel
Showing results for 
Search instead for 
Did you mean: 

Table creation when sending mail

Harsha3
New Contributor III

Hello,

I was designing a pipeline which includes salesforce upsert and deletion . Obviously error view will be captured for the upsert and deletion operation and while sending the mail along with sending the file we decided to incorporate the values ( like upsert success, error and delete success , delete error ) in a table format using snaplogic’s HTML TABLE method . We achieved the same but whenever we have say 2 values out of 4 we have two separate tables and if we have 3 values 3 tables are created but we would like to incorporate all the values in a single table view . Please find my pipeline and sample attachment.

image

As per the above screenshot we would like to have the values Submitted Leave Success and Cancel DEL success in a single table instead of separate table.

Please find my pipeline:

CM_GL_WORKDAY_TO_VEEVA_ABSENCE_INTEGRATION_2020_11_07.slp (109.8 KB)

9 REPLIES 9

del
Contributor III

I’m not sure I understand this question; but will try to answer.

If the output from your pipeline just before the email sender is 2 separate documents due to the way your pipeline is set up; the email sender creates a table row for each document (i.e. a table with 2 rows). If your output was 30 documents, the table would have 30 rows.

However, by adding the aggregate snap before the email sender, it reduces all the individual documents into a single document - therefore the email sender will only create a table with one row.

Harsha3
New Contributor III

Thanks for the comprehensive answer!

Hi Harsha,

As an alternative you can put your data in XML then use XSLT to generate an HTML and use this HTML as the body

Thanks,
M

Harsha3
New Contributor III

Thanks @alchemiz will try that approach too

Harsha3
New Contributor III

Hi Alchemiz,

I was able to obtain the result as per your method . Thanks since I am new to IT with intermediate knowledge in snaplogic , I would like to know how to create a vertical table . Can you please help me in modifying the code which I published below ( This code creates horizontal table).

Email Snap HTML Table table.Snap {background-color:transparent;border-collapse:collapse;width:100%;} table.Snap th, table.Snap td {text-align:center;border:1px solid black;padding:5px;} table.Snap th {background-color:Aquamarine;}

Hi Team,

Kindly find the attached sheet which contains affiliation and address mismatches in SIQ.

Success and Error record count:

Regards,