Sorting Variable Report Created from multiple collections

  • 16 December 2021
  • 0 replies
  • 1 view

Badge +1

I have a list detailing out every piece of software purchased by each division within my company, this list has over 5k responses. 

I have a query for 7 collections ( image collectons) 

21068iCF5E93C91CACD31A.png

 

These collections are then put through a for each loop, based upon the ID collection. (image for each) 

21069i5B31A87EDC5F5267.png

 

 

 Build string - this is within the for each loop to add lines to the variable report table

{WorkflowVariable:VarReport}<tr align="center">
<td style='color:#161717;font-weight; border: 1px solid #10407a;'>{WorkflowVariable:IDTxt}</td>
<td style='color:#bc9a31;font-weight; border: 1px solid #000080;'>{WorkflowVariable:ProgramTXT}</td>
<td style='color:#161717;font-weight; border: 1px solid #10407a;'>{WorkflowVariable:ProductNameTXT}</td>
<td style='color:#161717;font-weight; border: 1px solid #000080;'>{WorkflowVariable:ProductVendorTXT}</td>
<td style='color:#161717;font-weight; border: 1px solid #000080;'>{WorkflowVariable:SoftwareVersionTXT}</td>
<td style='color:#161717;font-weight; border: 1px solid #000080;'>{WorkflowVariable:CostNum}</td>
<td style='color:#161717;font-weight; border: 1px solid #000080;'>{WorkflowVariable:TotalLicenseCountNum}</td>
<td style='color:#161717;font-weight; border: 1px solid #000080;'>{WorkflowVariable:CostPerLicenseNum}</td>
</tr>

Then after the for each loop completes here is the build string to create the table for notification

<table cellpadding="2" style='border-collapse: collapse; border:1px solid #d9d9d9; font-family:"Helvetica","sans-serif";'><tr>
<td colspan="9" bgcolor="#edf1f5" align="center" style='font-size:20.0pt;font-family:"Helvetica","sans-serif";color:#293642; font-weight:bold'>Product cost</td><td></td></tr><tr>
<td colspan="9" align="center" bgcolor="#edf1f5" style='font-family:"Helvetica","sans-serif";color:#2874A6'>This report was generated on {WorkflowVariable:DateRan}</td><td></td></tr><tr>
<tr align="center" bgcolor="#18458c" style='font-weight:bold; font-family:"Helvetica","sans-serif";color:#ffffff'>
<td style='border: 1px solid #d9d9d9;'>ID</td>
<td style='border: 1px solid #d9d9d9;'>Program</td>
<td style='border: 1px solid #d9d9d9;'>Product Name</td>
<td style='border: 1px solid #d9d9d9;'>Product Vendor</td>
<td style='border: 1px solid #d9d9d9;'>License Version</td>
<td style='border: 1px solid #d9d9d9;'>Total License Cost</td>
<td style='border: 1px solid #d9d9d9;'>Total License Count</td>
<td style='border: 1px solid #d9d9d9;'>Cost Per License</td>{WorkflowVariable:VarReport}</td>

This is the report that is generated to email 

 

21070i7A41D6ADD644311A.png

 

SO my question is how can I sort this report, which is a multi-line variable based on a sinle column AFTER its compiled into the VarReport?? I want it sorted by product name or even vendor. 
 

 

 


0 replies

Be the first to reply!

Reply