Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Div
idProductTOC

On this page

Table of Contents
maxLevel1
excludeOn this page
typeflat
separatorpipe

Overview

This page shows how to use Augments for  for field manipulation or calculations when using the the JSON Table macro, which is part of the the Advanced Tables for Confluence app. In this example, we use use Groovy scripting to do field modification based on the field data. This is just a simple example of the technique.

Scripting is expensive, so make sure you surround the json-table macro with the Cache Macro JSON Table macro with the Cache macro and/or the Future Macromacro to minimize response time for the page. 

Reference

...

 

...

Macro

...

browser input

Select this

...

macro

Macro NamenameAdvanced Tables - JSON Table
Macro Syntaxsyntax{json-table}

Define these

...

parameters/

...

values

Macro Bodybody
[{a: 1495020217, b: 1495020217.0}]
JSON Table settings > Data settings > Output formatwiki
JSON Table settings > Data format > Augments to data row values, "{groovy}def x='%1%'; print x.substring(0,10){groovy}"

Column settings > Formatting > Column type (1

2)

MX~YYYY-MM-DD

MX~YYYY-MM-DD

Screenshot

Example

...

result

AB
2017-05-172017-05-17

Other

...

examples

Visit our full list of product examples for additional inspiration!Image Removed