TMTucker
Scholar

For each collection working on 3 of 4 variables/HTML table incorrect formatting

I have 2 problems.  Details will be below the 2... 

 

1. HTML table in email is not lining all the rows and instead only 1 box in every other row. 

2. Collection variable not displaying when using a for each. 

 

1. See screen shot 

          Screenshot with the code is what it should look like based on the HTML simulator. 

Initial code.PNG

          Screenshot with the email of what is actually produced. 

email.PNG

          The information comes from collection variables looped through a "for each". I have a comment log for each "for each" and ccan confirm the loop is working correctly and that the data in the email is accurate, just the formatting is wrong. Screenshot below of the loop. 

Build table 1.PNG

 

2. 2nd data collection operation not working as intended. 

           Screenshot below is the history log. Based on this I can see that the colleciton is pulling correctly as the names follow what they should. HOWEVER the last 2 comments are the "for each loop" that is pulling ONLY the title incorrectly. 

history log.png

 

This is the list query.  ( I do have a filter of when Workflow instance ID = Workflow Instance ID) the information pulls fine, its the "for each" that is failing.

list query.PNG

Screenshot of the loop. 

Task for each.PNG

 This is the WFTitle collection operation

title for each.PNG

- it matches every other one you see. 

** NOTE this was a test run for screenshots, so it appears that Program/outcome/people assigned does not work, but they do. I just skipped it for speed. 

 

ALSO if anyone knows a smarter way to accomplish these goals, I am all ears!

 

 

 

 

0 Kudos
Reply
3 Replies
MegaJerk
Collaborator

Re: For each collection working on 3 of 4 variables/HTML table incorrect formatting

Let's start with the first issue. 

Can you post your starting Table html, and your resulting html after the workflow has put together your complete table? 

 

Please remove any identifying information, but without actually seeing the resulting html it's almost impossible to help. 

 

By using the Code Block, you can simply paste your code into your reply so that we can easily copy / paste it. To do that, look at the controls above the body of your reply textarea, and expand the controls by clicking on the ellipsis (three dots "..."): 

MegaJerk_0-1635218669651.png

 

From there find the Insert /Edit code sample tool: 

MegaJerk_1-1635218844676.png

 

And then, in the new pop up window, select the type of code you're pasting into it (in this case HTML/XML) and then paste your code into the text area. Once you've finished, you can simply click on the OK button: 

MegaJerk_2-1635218899433.png

 

Thank you

 

 

0 Kudos
Reply
TMTucker
Scholar

Re: For each collection working on 3 of 4 variables/HTML table incorrect formatting

Thanks for the response. 

I was able to resolve the issue. 

 

Here is the code that was introduced into 2 different build strings. The issue was with the build table action, I was missing 2 ' marks within the code. 

 

START..... This is placed within the "for each" loop with all the collection operations. 

{WorkflowVariable:WF2VarReport}<tr align="center">
<td style='color:#161717;font-weight; border: 1px solid #10407a;'>{WorkflowVariable:WF2IDTxt}</td>
<td style='color:#bc9a31;font-weight; border: 1px solid #d9d9d9;'>{WorkflowVariable:WF2OutcomeTxt}</td>
<td style='color:#161717;font-weight; border: 1px solid #d9d9d9;'>{WorkflowVariable:WF2ApprovalCommentTxt}</td>
<td style='color:#161717;font-weight; border: 1px solid #d9d9d9;'>{WorkflowVariable:WF2TitleTxt}</td>

BUILD .... This is placed after the "for each" loop

<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'>ITAM Software List</td></tr><tr><td></td></tr><tr>
<td colspan="9" align="center" bgcolor="#edf1f5" style='font-family:"Helvetica","sans-serif";color:#293642'>The information below is for the ITAM workflow started on - {WorkflowVariable:StartDate} </td></tr><td></td></tr><tr><td colspan="9" align="center" bgcolor="#edf1f5" style='font-family:"Helvetica","sans-serif";color:#2874A6'>Action 1 (provide POR contacts) due date: - {WorkflowVariable:Action 1 -Due Date}</td><td></td></tr><tr>
<td colspan="9" align="center" bgcolor="#edf1f5" style='font-family:"Helvetica","sans-serif";color:#2874A6'>Action 2 (provide updated data) due date: - {WorkflowVariable:Action 2 - Due Date} </td>
<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;'>Outcome</td>
<td style='border: 1px solid #d9d9d9;'>Comments</td>
<td style='border: 1px solid #d9d9d9;'>WF Task Title</td>{WorkflowVariable:WF2VarReport}</td>
0 Kudos
Reply
MegaJerk
Collaborator

Re: For each collection working on 3 of 4 variables/HTML table incorrect formatting

excellent that it's solved! Don't forget to mark your answer as the solution to this problem!

0 Kudos
Reply