Format data in Email

  • 12 November 2015
  • 2 replies
  • 5 views

Badge +11

Hi,

This might be repeated question but I need some inputs. I'm trying to format my list data in the workflow email.

I have 3 columns: OTD, Cust disruptions, Month-Year. I'm able to generate the report in this format:

141512_pastedImage_0.png

But what i need is the below format:

141513_pastedImage_1.png

I have used the Query action, For-Each and collection operations get the individual data for each field. But i'm not able to transpose this with my HTML.

Could anyone suggest how this can be done? Which field needs to be used in the For Each?


2 replies

Badge +5

You would need to loop through your collection multiple times.  First time, just get the month and year.  Second time, just the OTD.  Third, just customer disruptions.  Then you will be able to build your table in the correct sequence.

 

<table>

  <tr><td>Month-Year</td><td>Sep-2015</td><td>Aug-2015</td></tr>  <-first time going through the collection

  <tr><td>OTD</td><td>60</td><td>80</td></tr>  <-second time going through the collection

  <tr><td>Customer Disruptions</td><td>6rd</td><td>5d</td></tr>  <-third time going through the collection

</table>

Badge +11

Thanks Jeremiah Powers

Needed bit work but your input helped. I have the desired output now.

Reply