Tables

The Encodian population engine enables JSON data to be easily added to tables within your slides.

This article provides detailed examples for creating the following types of tables:

Table - Basic

Table - Single Column

Table - Total

Table - Span Rows

Table - Simple

Example File: Encodian - Template Syntax - Table - Basic.pptx

Example JSON Data:

{
"contracts": [
{
"customerName": "Microsoft",
"value": 100000,
"expires": "13/06/2021"
},
{
"customerName": "Encodian",
"value": 6872500,
"expires": "18/02/2029"
},
{
"customerName": "Heritage",
"value": 13549,
"expires": "6/12/2025"
}
]
}

Configure the table within your slide and then populate it as follows to add the relevant JSON properties to each column:

Column 1: <<foreach [contract in contracts]>><<[contract.customerName]>>
Column 2: <<[contract.expires]:"yyyy.MM.dd">>
Column 3: <<[contract.value]>><</foreach>>

This generates the following output:

Table - Single Column

Example File: Encodian - Template Syntax - Table - Single Column.pptx

Example JSON Data:

{
"contracts": [
{
"customerName": "Microsoft",
"value": 100000,
"expires": "13/06/2021"
},
{
"customerName": "Encodian",
"value": 6872500,
"expires": "18/02/2029"
},
{
"customerName": "Heritage",
"value": 13549,
"expires": "6/12/2025"
}
]
}

Configure the table within your slide and then populate it as follows to add the relevant JSON properties to each column:

Row 1 > Column 1: <<foreach [contract in contracts]>>Customer: <<[contract.customerName]>>, Contract Date:<<[contract.expires]:"yyyy.MM.dd">>, Value: £<<[contract.value]>><</foreach -greedy>>

This generates the following output:

NOTE: the -greedy switch instructs the population engine to treat the property as a single row, if this is not used the output would be as follows:

Table - Total

Example File: Encodian - Template Syntax - Table - Total.pptx

Example JSON Data:

{
"contracts": [
{
"customerName": "Microsoft",
"value": 100000,
"expires": "13/06/2021"
},
{
"customerName": "Encodian",
"value": 6872500,
"expires": "18/02/2029"
},
{
"customerName": "Heritage",
"value": 13549,
"expires": "6/12/2025"
}
]
}

Configure the table within your slide and then populate it as follows to add the relevant JSON properties to each column:

Row 1 > Column 1: <<foreach [contract in contracts]>><<[contract.customerName]>>
Row 1 > Column 2: <<[contract.expires]:"yyyy.MM.dd">>
Row 1 > Column 3: £<<[contract.value]>><</foreach>>
Row 2 - Column 1: £<<[contracts.Sum(c =>c.value)]>>

This generates the following output:

Table - Span Rows

Example File: Encodian - Template Syntax - Table - Span Rows.pptx

Example JSON Data:

{
"contracts": [
{
"customerName": "Microsoft",
"value": 100000,
"expires": "13/06/2021"
},
{
"customerName": "Encodian",
"value": 6872500,
"expires": "18/02/2029"
},
{
"customerName": "Heritage",
"value": 13549,
"expires": "6/12/2025"
}
]
}

Configure the table within your slide and then populate as follows to add the relevant JSON properties to each column:

Row 1 > Column 1: <<foreach [contract in contracts]>><<[contract.customerName]>>
Row 1 > Column 2: <<[contract.expires]:"yyyy.MM.dd">>
Row 2 > Column 1: £Value: £<<[contract.value]>>
Row 2 > Column 2: <</foreach -greedy>>

NOTE: the -greedy switch instructs the population engine to treat the property as a single row

This generates the following output:

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Alan Norton

    If the data that you need in the table is contained in a sharepoint list (or a filtered sharepoint list) - could you then pass that through JSON into the table?  

Please sign in to leave a comment.
Powered by Zendesk