Can some suggest what is the best way to display a tabular data with coloring on rows in email body via a notification ?
Currently using ncolumntable() for table formation and used default html template in send email smart service for email body.
As the current requirement is to show the data in rows different color based on one of the column data (have some validations ) .I have tried using Ncoulmnstyledtable) , its not working .
Appian version is 16.3.
Discussion posts and replies are publicly visible
You can use String concatenation instead of using concat() function in Child rule like &" "& , to avoid semi-colon issue, if this do not work, try removing semicolon from the resultant String using text Function
Hey Alok i followed the same thing but when i pass data i am getting some thing like this
Hi Rohan, as I can see, you are trying to perform string concatenation and also you are using if else conditions along with string concatenation, which might be causing you this issue where your conditional statements are also getting printed on the web page.
Also I believe, you might be missing the double quotes and html tag closure in order, which might be also one of the root cause.
I strongly suggest, use concat() instead of using &""& for string concatenation, this improves the readability and you can trace out root cause easily.
Hope it will help you
The HTML Code:
<table style='width:100%' border='1'><tr bgcolor='blue'><th>License Number</th><th>Line Number </th><th>Last Producing UWI</th><th>Activity Type</th><th>LastProduction Date</th><th>Date of Non-Compliance</th><th>Days to Non-Compliance</th></tr>"& apply( rule!AST_emailTest( PRTRR_PipelineList: ###data###, index: _ ), if( rule!APN_isEmpty(###data1###), {}, enumerate(1 + length(ri!PRTRR_PipelineList)) ))&"</table><br></br><br></br> <font color='yellow'>YELLOW </font><legend>-> Inactive Lines Requiring a Decision</legend><br></br><font color='orange'>ORANGE </font><legend>-> Non-Compliance Imminent </legend><br></br><font color='red'>ORANGE</font><legend>-> Non-Compliant Pipelines </legend>
The AST_emailTest
concat( "<tr>", "<td>"&index(index(ri!PRTRR_PipelineList, "lineNumber", null()), ri!index, null())&"</td>", "<td>"&index(index(ri!PRTRR_PipelineList, "uwi", null()), ri!index, null())&"</td>", "<td>"&index(index(ri!PRTRR_PipelineList, "activity", null()), ri!index, null())&"</td>", "<td>"&index(index(ri!PRTRR_PipelineList, "lastprod", null()), ri!index, null())&"</td>", "<td>"&index(index(ri!PRTRR_PipelineList, "nonComp", null()), ri!index, null())&"</td>", "<td>"&index(index(ri!PRTRR_PipelineList, "daysTo", null()), ri!index, null())&"</td>", "<td>"&index(index(ri!PRTRR_PipelineList, "daysToNonCompliance", null()), ri!index, null())&"</td>", "</tr>")
This is What i have been doing an d getting the output which i have posted before.
Thanks in advance