Edit in GitHubLog an issue

Complex Table Constructs

Add additional properties to table tags to apply advanced functionalities on table.

This section is DEPRECATED. To continue using complex table constructs, please refer to Complex Table Constructs with Table markers.

Dynamically expand table rows or columns

Specify the cell extension property inside the table cell to indicate whether to expand table rows vertically or columns horizontally.

JSON representation of the input data:

Copied to your clipboard
1{
2 "subscriptions": [
3 {
4 "name": "Adobe Document API",
5 "price": "99"
6 },
7 {
8 "name": "Adobe Marketing API",
9 "price": "199"
10 },
11 {
12 "name": "Adobe Design API",
13 "price": "299"
14 }
15
16 ]
17}
  • Repeat table rows vertically - {{subscriptions.name:cell-extension(vertical)}} tag lets the engine know that cells will be extended in vertical direction.

Table gets vertically extended as table rows are repeated

  • Repeat table columns horizontally - {{subscriptions.name:cell-extension(horizontal)}} tag lets the engine know that cells will be extended in horizontal direction.

Table gets horizontally extended as table columns are repeated

Dynamic table columns

Discard a column or set of columns in a table from the final generated document as follows :

Discard column if empty

Column in a table can be discarded if every element of an array in the input json is empty or null.

How to use
Add discard-if-empty construct with boolean false/true along with the template tag to activate discard if empty feature for the corresponding column.

JSON representation of the input data:

Json 1

Copied to your clipboard
1{
2 "Project": [
3 {
4 "Name": "ABC Infra",
5 "Milestone": "First Milestone",
6 "DateComplete": "24/06/2021",
7 "Notes": ""
8 },
9 {
10 "Name": "ABC Infra",
11 "Milestone": "Second Milestone",
12 "DateComplete": "24/06/2022",
13 "Notes": ""
14 },
15 {
16 "Name": "DEF Computer Labs",
17 "Milestone": "First Milestone",
18 "DateComplete": "12/12/2021",
19 "Notes": ""
20 },
21 {
22 "Name": "DEF Computer Labs",
23 "Milestone": "Second Milestone",
24 "DateComplete": "12/12/2021",
25 "Notes": ""
26 }
27 ]
28}

Json2

Copied to your clipboard
1{
2 "Project": [
3 {
4 "Name": "ABC Infra",
5 "Milestone": "First Milestone",
6 "DateComplete": "24/06/2021"
7 },
8 {
9 "Name": "ABC Infra",
10 "Milestone": "Second Milestone",
11 "DateComplete": "24/06/2022"
12 },
13 {
14 "Name": "DEF Computer Labs",
15 "Milestone": "First Milestone",
16 "DateComplete": "12/12/2021"
17 },
18 {
19 "Name": "DEF Computer Labs",
20 "Milestone": "Second Milestone",
21 "DateComplete": "12/12/2021"
22 }
23 ]
24}

Adding discard-if-empty construct with boolean false/true along with the template tag to activate discard if empty feature for the corresponding column

{{Project.Notes:discard-if-empty(true)}} tag lets the engine discard the particular column if every element of an array in the input json is either empty or null.

Note: The row above the authored row will be considered as a header row. Cell from the header row will be discarded along with discarded column.

Header Row of Development Milestones table

Header Row of Conversion tracking table

Development Milestones table without header row

Discard column if condition evaluates to true

Column in the table can be discarded If condition provided in the discard-if(expr(condition)) evaluates to true. Add discard-if(expr(condition)) construct along with the template tag to activate discard if feature for the corresponding column.

JSON representation of the input data:

Copied to your clipboard
1{
2 "Conversion": [
3 {
4 "Month": "July, 2021",
5 "Rate": 10,
6 "Method": "Payout by Cheque"
7 },
8 {
9 "Month": "September, 2021",
10 "Rate": 30,
11 "Method": "Payout by Cheque"
12 },
13 {
14 "Month": "Dec, 2021",
15 "Rate": 20,
16 "Method": "Payout by Cheque"
17 },
18 {
19 "Month": "April, 2022",
20 "Rate": 20,
21 "Method": "Payout by Cheque"
22 },
23 {
24 "Month": "Dec, 2022",
25 "Rate": 30,
26 "Method": "Payout by Cheque"
27 }
28 ]
29}

Added discard-if(expr(**condition**)) construct along with the template tag to activate discard if feature for the corresponding column

{{Conversion.Rate:discard-if(expr($sum(Conversion.Rate)!= 100))}} tag lets the engine discard the particular column if condition provided in the expr construct evaluates to true.

Dynamic table rows

Discard a row or set of rows in a table from the final generated document.

Discard row if condition evaluates to true

A row in the table can be discarded only when the condition in the discard-row-if(expr(condition),context) evaluates to true in the provided context. Add this construct along with the template tag to discard the row based on the provided condition.

For Example: {{TABLE_CONTEXT.PROPERTY:discard-row-if(expr(PROPERTY = "TEST_VALUE"),TABLE_CONTEXT)}}

JSON representation of the input data:

Copied to your clipboard
1{
2 "Conversion": [
3 {
4 "Month": "July, 2021",
5 "Rate": 10,
6 "Method": "Payout by Cheque"
7 },
8 {
9 "Month": "Dec, 2021",
10 "Rate": 20,
11 "Method": "Payout by Cheque"
12 },
13 {
14 "Month": "Dec, 2022",
15 "Rate": 40,
16 "Method": "Payout by Cheque"
17 },
18 {
19 "Month": "Dec, 2021",
20 "Rate": 80,
21 "Method": "Payout by Cheque"
22 },
23 {
24 "Month": "April, 2022",
25 "Rate": 100,
26 "Method": "Payout by Cash"
27 },
28 {
29 "Month": "Dec, 2022",
30 "Rate": 45,
31 "Method": "Payout by Cheque"
32 }
33 ]
34}

Added discard-row-if(expr(condition),context) construct along with the template tag to activate discard row if feature for the corresponding rows In a row, if multiple “discard-row-if” are used, then the row will be discarded if any one of the conditions evaluates to true.

Note: The header row is also removed when all the rows are discarded thus removing the complete table.

Conditions inside tables

An additional construct eval is introduced for conditionals inside tables, which is required while evaluating conditions based on fields of the table currently being expanded. The expression inside eval is an array of objects where each entry of object serves as context to evaluate the condition in the corresponding row of table.

JSON representation of the input data:

Copied to your clipboard
1{
2 "company": [
3 {
4 "name": "ABC",
5 "supportsX" : "TRUE"
6 },
7 {
8 "name": "XYZ",
9 "supportsX": "FALSE"
10 }
11
12 ]
13}

Index based conditional evaluation inside table In the above example, the array of objects on which the condition needs to be evaluated (company) is provided in eval, and the expr contains the actual condition supportsX="TRUE". The condition is evaluated based on each entry of the array and applied to the corresponding row in the output table.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.