which is the best practice in terms of creating a table?
Is it ncolumntable or html table?
Thanks and Regards
As per my understanding, if you are looking to generate a dynamic table in Appian then i would prefer to go for Custom Implementation of HTML Table data generation.
Considering the following table structure:
We can create a HTML template which will be as follows:
Now we can generate the data for this table dynamically as follows:
1. Create an expression rule, let's say YourProject_generateTableContent which will have an input of type CDT, for which we want to generate the Table form data as shown below:
"<td>"&index(fv!item, "month", null())&"</td>",
"<td>"&dollar(index(fv!item, "amount", null()))&"</td>",
Considering input_cdt is your Rule input of type CDT or Any Type
which has two fields, i.e. month and amount
Now you can make the use of this template wherever you need it. e.g. I want to send an email
a. Use Send E-Mail Smart Service and choose, use a Text or HTML Template option >> Select your HTML Template >> This will populate data field to replace with a value >> Call your expression rule YourProject_generateTableContent(input_cdt: pv!input_cdt) by passing the input parameter value, setup other properties of this smart service >> Save and Publish and Execute this process.
You can find an email will be triggered where the table data is generated dynamically in Appian(considering the process variable has the value to generate the table cell rows) using it's expression rule.
As per my understanding it's a one time effort but once it's built, can be used for any cdt by defining the input of type AnyType and tweaking this rule a bit and also performance wise this is great as the rule takes very less time to generate the table cell rows/content.
Hope this will help you.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.